How to Create a UserForm Like a Pro

แชร์
ฝัง
  • เผยแพร่เมื่อ 6 ก.ย. 2024

ความคิดเห็น • 76

  • @Excelmacromastery
    @Excelmacromastery  6 หลายเดือนก่อน +4

    Let me know in the comments below, if you have struggled with UserForms.
    Make sure to download the source code from the link in the description below👇

    • @darinhinds960
      @darinhinds960 5 หลายเดือนก่อน

      getting a run time error (381) with this code

  • @andrewvidale
    @andrewvidale 4 หลายเดือนก่อน +3

    This is wonderful! Ive been writing VBA for decades, but, as an old school procedural programmer who grew up writing Fortran I've always known there was a much better way than global variables to pass data to and return values from forms but until now I'd not happened across it, thank you.

  • @simondechoisy779
    @simondechoisy779 6 หลายเดือนก่อน +3

    Love the fact that you demonstrate encapsulation. This is the thing I see most commonly wrong when userforms are written!

  • @user-mr8cy4uf3o
    @user-mr8cy4uf3o 6 หลายเดือนก่อน +3

    Using properties for user forms never crossed my mind. I used to declare global variables inside the user form instead.
    That was very helpful, thank you! ❤

    • @Excelmacromastery
      @Excelmacromastery  6 หลายเดือนก่อน +1

      You're welcome

    • @gonzaortin739
      @gonzaortin739 6 หลายเดือนก่อน

      I didnt know either. As I try to avoid global variables, I was calling subs and passing parameters. The property way is better.

  • @R72Investments
    @R72Investments 6 หลายเดือนก่อน +3

    World class! But we know nothing but world class from Paul 👍

  • @ElectromecanicaIndustrial
    @ElectromecanicaIndustrial 3 หลายเดือนก่อน

    Wow, I'm really impressed. Literally all the tutorials for userform don't follow your approach of good software design and follow the bad design you mentioned. I would also ask, if is possible to know about a book that teaches you good software practices for creating databased and retrieving data ?

  • @RogerFPrida
    @RogerFPrida 6 หลายเดือนก่อน

    The last advice you provided, about the late binding of the userform, is great. I struggled to figure out how to prevent the userform from hiding, and never managed to do it.

    • @Excelmacromastery
      @Excelmacromastery  6 หลายเดือนก่อน +1

      Glad it was helpful. Not an obvious solution at all.

  • @billroberts2808
    @billroberts2808 6 หลายเดือนก่อน

    Thanks Paul! I implement user forms and other objects to help direct users in performing tasks - and control activities in a logical direction. You showed how to keep from using live data in Excel - great idea! Best regards.

  • @tomharrington1453
    @tomharrington1453 3 หลายเดือนก่อน

    Great video. I am going to have to watch this at least one more time. There is a lot of information in this video.

  • @free3690
    @free3690 6 หลายเดือนก่อน

    Another amazing video. I created a similar UserForm years ago and just reuse it with different content. Your video shows different ways the form might not work as expected, so I’m going to try and see if it will break my code! Thanks so much.

  • @SolutionsByPVV
    @SolutionsByPVV 5 หลายเดือนก่อน

    Oh, Paul !
    This is a very useful tutorial video on how to use custom forms.

  • @user-bx9ki1xk3l
    @user-bx9ki1xk3l 6 หลายเดือนก่อน +1

    Hi @Paul..Thank you for all your tutorials, I really learned a lot...could you please make a tutorial on searchable dropdown list without using a class, just a normal sub and no overriding of events. Your approach is the fastest among tutorials that I've watched. I tried it with my 27k of rows and it seems very smooth. I have comboboxes that are dependent on the search result. Thank you.

    • @Excelmacromastery
      @Excelmacromastery  6 หลายเดือนก่อน

      Just at the class member subs/functions to the userform.

  • @chrishixson487
    @chrishixson487 6 หลายเดือนก่อน +1

    The audio volume drops quite bit around 11:30. Content is great. Thank you!

    • @Excelmacromastery
      @Excelmacromastery  6 หลายเดือนก่อน +1

      Just saw that now. Glad you enjoyed the video.

  • @olivermeyer3963
    @olivermeyer3963 4 หลายเดือนก่อน

    Hi Paul many thanks for this video and all your videos. Very cool stuff. Just in case some day you are looking for new content for Excel and VBA let me know.

  • @kcerny43
    @kcerny43 6 หลายเดือนก่อน

    Paul, thank you so much. I like a combination of user form with properties. Very impressive!

  • @uraharakisuke1893
    @uraharakisuke1893 6 หลายเดือนก่อน

    Great class, I'm loving your videos, thank you very much! I have a question though: I not simply evoke the userform by it's own name (e.g. myUserform.Show) instead of assigning it to a variable (Dim uf As New myUserform...) before showing/initializing it (uf.Show)?

  • @danielsantos2201
    @danielsantos2201 6 หลายเดือนก่อน

    Excellent class, I learn a lot of interesting things. Thank you very much !

  • @ragnarok7976
    @ragnarok7976 6 หลายเดือนก่อน

    Silly ol me typing out my properties by hand when you can actually insert them... I even googled for something like that and nothing I could find mentioned it 😮
    Learn something new everyday!

  • @big1975E
    @big1975E 6 หลายเดือนก่อน

    This is another awesome video! Do you think it would be worth it to do a more in-depth video on properties and all the different ways they can be used other than a userform if there are any?

    • @Excelmacromastery
      @Excelmacromastery  6 หลายเดือนก่อน +2

      A videos on the userform controls would probably be the most likely.

  • @johnwayne8059
    @johnwayne8059 6 หลายเดือนก่อน +1

    Well done Paul, as usual!😉🤟😎

  • @hammeedabdo.82
    @hammeedabdo.82 6 หลายเดือนก่อน

    Thank you, Paul, for all the ideas and projects you provide.
    Please, can you give me the source from which you took the idea of creating a trading simulator?

  • @ravenmarks.eduardo142
    @ravenmarks.eduardo142 6 หลายเดือนก่อน

    Hi sir Paul. I'm a big fan of your VBA coding. I was just wondering. Is there anyway that we could possibly write code in VS code in replacement to VB code Editor?

  • @karenbrock2379
    @karenbrock2379 5 หลายเดือนก่อน

    Sorry I am lost at the start , used to do lots of ms access stuff years ago but I get the boxes, buttons etc but the VBA stuff is a bit to fast to follow. My F7 +Shift is not working which just makes things really slow too

  • @Jamesedwardkoch
    @Jamesedwardkoch 6 หลายเดือนก่อน

    Thank you for all your help in VBA.
    I wanted to ask if you have ever done a video specifically about the Gremlins in VBA, the kind of errors where all the code disappears, or where it runs one PC but not another, with little to know explanation.
    If you haven't yet then i would really appreciate it if you would. Because those gremlins make me less trusting of VBA, especially when you're doing it freelance.
    These are the kind of errors where the cause is unknown and cannot be repeated but are instead intermittent.
    Thanks

    • @Excelmacromastery
      @Excelmacromastery  6 หลายเดือนก่อน

      The first line of defence is making sure that office is up to date.
      It's difficult to do a video on them as they are elusive by nature.

    • @Jamesedwardkoch
      @Jamesedwardkoch 6 หลายเดือนก่อน

      @@Excelmacromastery thank you so much for replying. I'll do that now, update office.
      But maybe it's still worth talking about, maybe put a poll out 🤓

  • @josh_excel
    @josh_excel 6 หลายเดือนก่อน

    Definitely learned some things. Thanks!

  • @hammeedabdo.82
    @hammeedabdo.82 6 หลายเดือนก่อน +1

    Do you recommend using VBA to create trading robots, indicators, or even automate trading?
    If yes, where is the right place to start, and what is your general advice?

    • @ragnarok7976
      @ragnarok7976 6 หลายเดือนก่อน

      VBA is great for automating things in Excel but it gets pretty complex if you want to use it outside of that scope.
      I'd probably recommend using something like Python since it's more general purpose and in my experience, it integrates better with other languages/software than VBA does. There are probably more tutorials available for Python too... Likely even some specific to trading bots.
      There are also libraries (like pandas) that make it easy to read data from and save data to Excel workbooks.
      Hope it helps!

    • @hammeedabdo.82
      @hammeedabdo.82 6 หลายเดือนก่อน

      @@ragnarok7976thank you for your help. I hope we can see Mr. Paul's opinion on this .

  • @temyraverdana6421
    @temyraverdana6421 6 หลายเดือนก่อน

    Great lesson. Thanks a lot

  • @SAMSITARAGUYANG
    @SAMSITARAGUYANG 6 หลายเดือนก่อน

    What your link documentation vba sir...

  • @PhongNguyen-qf5ue
    @PhongNguyen-qf5ue 4 หลายเดือนก่อน

    very good | Nguyen Hong Phuc

  • @VladikHannzzeboff
    @VladikHannzzeboff 6 หลายเดือนก่อน

    Hi, Paul! Useful video, like all your other videos. I am interested in your opinion, tell me, please, I have noticed that in most cases for integer numbers you always use a long type instead of an integer type, even when the number is theoretically up to 30k, does the types affect the performance of macros and is it worth spending time on it or just always use a long type? Thank you in advance for your answer 😊

    • @Excelmacromastery
      @Excelmacromastery  6 หลายเดือนก่อน

      Use Long
      "Traditionally, VBA programmers have used integers to hold small numbers, because they required less memory. In recent versions, however, VBA converts all integer values to type Long, even if they're declared as type Integer. So there's no longer a performance advantage to using Integer variables; in fact, Long variables may be slightly faster because VBA does not have to convert them." - learn.microsoft.com/en-us/previous-versions/office/developer/office2000/aa164506(v=office.10)?redirectedfrom=MSDN

  • @godisalmighty4449
    @godisalmighty4449 6 หลายเดือนก่อน

    Thank you so much.

  • @TheSardOz
    @TheSardOz 6 หลายเดือนก่อน +1

    Hi Paul, I have got a question .. i have implemented few new Userforms into a quite large dashboard this forms simply paste/delete and display values, but since then the work book crashes in a odd way, looks like the VBA editor dies.... is a bit odd to me has this happens without having the forms running... Any guess from you about what it could be?

    • @Excelmacromastery
      @Excelmacromastery  6 หลายเดือนก่อน

      Not easy to know without seeing rhe code.

    • @TheSardOz
      @TheSardOz 6 หลายเดือนก่อน

      happy to send you an email if you have time ... @@Excelmacromastery

    • @ragnarok7976
      @ragnarok7976 6 หลายเดือนก่อน

      Do you have any lists or combo boxes on those forms that reference a table (list object) on a sheet?
      I have crashed excel before using rowsource with a table reference and then trying to manipulate the data.
      Hope you figure it out either way!

    • @TheSardOz
      @TheSardOz 6 หลายเดือนก่อน

      hey mate thanks for sharing.... no non od the data the form read or write is a table object , but i do use RowSource to load data into a listbox@@ragnarok7976

    • @Mk-lp9tm
      @Mk-lp9tm 6 หลายเดือนก่อน +2

      It happened to me lately while building my workbook. Apparently, copying and pasting repeatedly uses a lot of memory and will eventually lead into crashes. Application.CutCopyMode = false did the trick for me.

  • @vinothkumarmanoharan2317
    @vinothkumarmanoharan2317 6 หลายเดือนก่อน

    My expected one.

  • @edgarsantarosa9847
    @edgarsantarosa9847 6 หลายเดือนก่อน +1

    Hello Paul 👋🏻, I have a class that apply masks to texbox. Can I send it to you if want to make video about to the others. I see it's a struggling in Excel VBA, regards Edgar

    • @Excelmacromastery
      @Excelmacromastery  6 หลายเดือนก่อน +2

      Send it on and I'll take a look.

    • @edgarsantarosa9847
      @edgarsantarosa9847 6 หลายเดือนก่อน

      @@Excelmacromastery sure! I just need translate the code, because I'm from Brazil, then I'll send it to you

  • @Dexter101x
    @Dexter101x 6 หลายเดือนก่อน

    Cool to know that there's a hack to get the user form back after minimising Excel

  • @abdulrehmanmughal8235
    @abdulrehmanmughal8235 6 หลายเดือนก่อน

    amazing informative

  • @vijaysahal4556
    @vijaysahal4556 6 หลายเดือนก่อน

    Amazing ❤

  • @prediction2302
    @prediction2302 6 หลายเดือนก่อน

    How userform password protected that anyone not able to break password

  • @gonzaortin739
    @gonzaortin739 6 หลายเดือนก่อน

    Wow

  • @byteseq
    @byteseq 6 หลายเดือนก่อน

    From 15:48 to 16:00 you repeatedly say "Worksheet" when you mean "UserForm"...