Macro Programming in LibreOffice Calc with BASIC - Introduction

Поділитися
Вставка
  • Опубліковано 13 гру 2024

КОМЕНТАРІ • 47

  • @mikecolley-
    @mikecolley- 2 роки тому +2

    PERFECT. I"m a compiled BASIC person and this explanation worked GREAT for me, I will refer back to it. If you do make a new video, please don't erase this video because it shows me so much and I will use this video as a reference over and over. PERFECT Video. Thank You!

  • @jorgealmeida3637
    @jorgealmeida3637 4 роки тому +4

    I've learned a lot in a short time. Please continue. Thank you!

  • @projectnathanadam6232
    @projectnathanadam6232 5 місяців тому

    You have no idea how much your video has helped me! Thank you so much. I am a beginner and I was following along and add my own numbers, to which I didn't realize that I there is a limit to how big the numbers could be, other than that problem it went smoothly.

  • @henrylawson430
    @henrylawson430 3 роки тому +4

    Thank you, very helpful. Needless to say this task could completed with formulas but it was great seeing how to do in Basic to get my head around writing macros.

  • @TeaAndFloppyDisks
    @TeaAndFloppyDisks 4 місяці тому

    That's a really good place to start. Thank you for the easy to follow instructions! It looks a lot like the VBA used in MS Office, but the built-in objects (such as ThisWorkbook) are different.

  • @steve91311
    @steve91311 2 роки тому +3

    "REM" does not mean 'reminder'. It has always meant 'remark'.

  • @clarksims54
    @clarksims54 3 роки тому +1

    This is a great tutorial. Thanks for posting.

  • @pratikmahamuni4856
    @pratikmahamuni4856 3 роки тому

    Great video. I appreciate you putting the documentation as well!

  • @petermartin5030
    @petermartin5030 11 місяців тому +1

    A small correction: At time 10:20, the FOR loop will execute 101 times, not 100, because i starts at 0 not 1.

  • @petermartin5030
    @petermartin5030 11 місяців тому +1

    A good way to figure out how to do things in macros, is to record a macro while you do the operations manually in the spreadsheet. Then edit the macro and you will see how the operations you did have been programmed in a macro.

    • @ackfee6086
      @ackfee6086  11 місяців тому

      That is a great suggestion, however personally I've found that the macro recording process generates useless steps which can be confusing to new users and difficult to debug when something goes wrong, or if you want to change something.

  • @famalicao4760
    @famalicao4760 2 роки тому +1

    Thank you very much ! Very good explanation, easy to understand, helped me very much!

  • @johnwysham5725
    @johnwysham5725 2 роки тому

    This is just excellent. Am very grateful. Thank you!

  • @piotr_biły_1959
    @piotr_biły_1959 Рік тому

    Finally, after 30 years of occasional use of spreadsheets, I was forced to start programming. Apart from the fact that I mistyped "curSheet", which took me an embarrassingly long time to find, everything worked right out of the box. Thank you.
    PS For people like me, I'm posting something for copy-paste.
    REM ***** BASIC *****
    Sub Main
    Dim currDoc as object
    Dim currSheets as object
    Dim currSheet as object
    Dim currCell as object
    Const dodaj as integer=1000
    currDoc = ThisComponent
    If NOT currDoc.SupportsService("com.sun.star.sheet.SpreadsheetDocument") Then Exit Sub
    currSheets = currDoc.getSheets()
    currSheet = currSheets.getByIndex("Sheet1")
    For i = 1 To 10 Step 1
    currCell = currSheet.getCellByPosition(5,i)
    If currCell.String="" Then
    a = currSheet.getCellByPosition(1,i).value
    b = currSheet.getCellByPosition(0,i).value
    wynik = a*b+dodaj
    currCell = currSheet.getCellByPosition(6,i)
    currCell.value = wynik
    EndIf
    Next
    End Sub

  • @BlokeBritish
    @BlokeBritish 3 роки тому +1

    in excel vba there is a Userform in wich other controls can be added.
    similarly libre has the "Dialog"
    but vba has a Frame control wich can be added to a userform.
    this Frame can have other child controls too like a button
    Libre has no such Frame control
    so then , wat is the way to achieve the Frame like effect in Libre ?

  • @NavyCuda
    @NavyCuda 9 місяців тому

    Is there a way to write a custom function and have the autofill work in calc?

  • @drvenkazan
    @drvenkazan 4 роки тому +1

    thank you, now i can program my الغجر زنجي أسود macro, inshallah

  • @martinfyhn1976
    @martinfyhn1976 3 роки тому +3

    Great video, thank you.
    A couple of notes:
    - As it has been mentioned, the font size is a tad on the small side, especially on my phone 😂
    - If you do a final voiceover after you've finished recording, so it's more clear what you're saying, with less unfinished sentences, then it would be easier to retain the information you so graciously are sharing (it might just be me struggling with attention. My head is rather noisy, so it doesn't take much for me to lose track of what's being said)
    But keep up the good work 👍

    • @ackfee6086
      @ackfee6086  3 роки тому +3

      Yeah looking at it now, I can see that. I use a 4K monitor so for me small font size is not a problem, but I agree. I fixed that in my last video, where I have some zooming and moving. On the topic of voiceover, I actually had a script for doing it live, but since I'm a bit socially awkward (you can see that since I'm programming spreadsheets), it didn't go as smoothly as planned. I definitely want to do some more videos, but I'm a bit unsure whether to post them since they're about electronics and graphics, not spreadsheets. Anyway, since this video I've learned a lot, even DIY'd a better microphone, so hopefully it gets better. Thanks for all your feedback!

    • @martinfyhn1976
      @martinfyhn1976 3 роки тому

      @@ackfee6086 Yeah, just watched it, it's much more readable, and has good momentum - great improvements! 👍
      I see the e-mail account is empty, so it's probably sacrificial, but in case it's not, the address is visible in that video.
      Yeah - I'm not exactly a social genius either 😂 but I will say that especially the last video sounds like there's more confidence behind, so well done!
      You do write that it's a channel for everything, but if you plan on doing many more videos with varying contents, it could be a good idea to categorize it into different channels - but if nothing else, you can start out with dividing your videos into playlists.

  • @kapilvora
    @kapilvora Рік тому

    Hello, I'm new to learning Macros on Libreoffice Calc, I saw on other excel macros tutorials that there is a typing assistant to autofill the code and available commands for e.g. when you type activecell. a list of commands appears in a dropdown list with options like Activate, AddComment, Address etc. How do you get this in Libreoffice Basic?

  • @youssh4975
    @youssh4975 3 роки тому +1

    where can i get a list of ThisComponent's methods? this shit obscure af

  • @worcesterexchange554
    @worcesterexchange554 Рік тому

    It is good information but the display is too small to read, even at 1080 on quite a big screen. Any chance that you could re-record it zoomed in?

  • @tg5441
    @tg5441 Рік тому

    Is it compatible with vba for excel?

  • @raymondroy77
    @raymondroy77 2 роки тому

    I was wondering if you could create a macro manually for Advanced Filter. The Record Macro does not register changing sheet or any dropdown menu are not recorded. It would be greatly appreciated if this could be done. Thank you for sharing your knowledge with Us.

  • @clayshippy2652
    @clayshippy2652 3 роки тому

    Very helpful - but I can't read your code it's too small. Can you enlarge that for the next video please.

  • @davidpaez_co
    @davidpaez_co 3 роки тому

    Thank you!

  • @Hunar1997
    @Hunar1997 4 роки тому +5

    I wish you increased the fontsize, i cant see anything

  • @kimchee94112
    @kimchee94112 2 роки тому

    Would be better if you executed the program for someone like me not familiar with the procedures. Is there a trace routine for troubleshooting? Don't remembered BASIC was like this, lol.

    • @ackfee6086
      @ackfee6086  2 роки тому +1

      The program was actually executed, Libreoffice just doesn't make it obvious. This is a special dialect of BASIC optimized for use with office programs. It's most similar to VBA. Anyways for the debugging you can use this official guide:
      help.libreoffice.org/latest/ro/text/sbasic/shared/01030300.html
      I might make another video with more programming tricks and projects soon.

  • @robcr8
    @robcr8 4 роки тому

    I am trying to learn how to send an email reminder from officelibre calc table. I cannot find any documentation to teach me. Can this be done by a formula? Can you recommend anything?

    • @ackfee6086
      @ackfee6086  4 роки тому

      I will make a video on this either today or tomorrow, so expect that, it's pretty easy but there are some Windows-specific things that can make it confusing. Stay tuned!

    • @robcr8
      @robcr8 4 роки тому

      @@ackfee6086 wow.. thanks so much 👍

  • @varshneydevansh
    @varshneydevansh 10 місяців тому

    thanks

  • @unity3dconcepts434
    @unity3dconcepts434 2 роки тому

    It would have been better if you had zoomed in a little bit. Very hard to view the video below 720p.

  • @worcesterexchange554
    @worcesterexchange554 Рік тому

    Rem stands for Remark

  • @vamsikrishnapadala
    @vamsikrishnapadala 4 роки тому

    Thank you

  • @lciavarella
    @lciavarella 3 роки тому +6

    I couldn't find my magnifying glass so it was hard to watch.

    • @thedanyesful
      @thedanyesful 3 роки тому

      what size is your monitor? looks fine on my 30 inch.

    • @PeachyNana1952
      @PeachyNana1952 Рік тому

      I can see it on my iPad. It’s difficult but possible.

  • @rayfellers
    @rayfellers Рік тому

    Starting from scratch with a blank sheet and running a macro to generate the spreadsheet content is what I hoped to find. This isn't it and the audio is so low that I can't hear it anyway even with my audio output set to max.

  • @camcairns2584
    @camcairns2584 Рік тому +2

    The incessant comparison with other languages detracts. Anyone who has more than one language under their belt has learned to do it subliminally - or the benefits of not doing it all if they can avoid it.

    • @ackfee6086
      @ackfee6086  Рік тому

      Even though I agree that the didactic approach of the video can be improved, I do think that in this case incessant comparison with other languages has a net positive effect. Most people wouldn't learn LO BASIC as their first programming language, and neither would they use it as a main one. The intended audience of this video for me was beginner-advanced programmers who know other languages and need to make a script or two in LO BASIC, which I believe is the main way people interact with the language. Still, I agree that the comparisons might be excessive, but I don't think that they should be avoided.
      Once I have time, I would like to remake all of these videos now that I have improved my video-making somewhat.

  • @moacyr9140
    @moacyr9140 Місяць тому

    EU DOU O CU

  • @ventjemazzel8822
    @ventjemazzel8822 5 місяців тому

    Thank you