MD ISMAIL Hosen
MD ISMAIL Hosen
  • 294
  • 100 359
I Replaced Full Columns with TRIMRANGE and Got AMAZING Results
Please contact me for any project or VBA Automation.
Contacts:
Fiverr: www.fiverr.com/s/5rdZD6k
Email: 1997ismail.hosen@gmail.com
WhatsApp: +8801515649307
LinkedIn: www.linkedin.com/in/md-ismail-hosen-b77500135/
Facebook: mdismail.hosen.7
UA-cam: ua-cam.com/channels/L-q7_WvISkw0Ox9FRBBzmw.html
File link:
Переглядів: 56

Відео

Saving XML Files Like a PRO in 2025!
Переглядів 3021 день тому
Please contact me for any project or VBA Automation. Contacts: Fiverr: www.fiverr.com/s/5rdZD6k Email: 1997ismail.hosen@gmail.com WhatsApp: 8801515649307 LinkedIn: www.linkedin.com/in/md-ismail-hosen-b77500135/ Facebook: mdismail.hosen.7 UA-cam: ua-cam.com/channels/L-q7_WvISkw0Ox9FRBBzmw.html File link:
The XML Template Trick That's Revolutionizing Data Exchange
Переглядів 4621 день тому
Please contact me for any project or VBA Automation. Contacts: Fiverr: www.fiverr.com/s/5rdZD6k Email: 1997ismail.hosen@gmail.com WhatsApp: 8801515649307 LinkedIn: www.linkedin.com/in/md-ismail-hosen-b77500135/ Facebook: mdismail.hosen.7 UA-cam: ua-cam.com/channels/L-q7_WvISkw0Ox9FRBBzmw.html File link:
Extract Data From XML Easily Using Power Query
Переглядів 8628 днів тому
Please contact me for any project or VBA Automation. Contacts: Fiverr: www.fiverr.com/s/5rdZD6k Email: 1997ismail.hosen@gmail.com WhatsApp: 8801515649307 LinkedIn: www.linkedin.com/in/md-ismail-hosen-b77500135/ Facebook: mdismail.hosen.7 UA-cam: ua-cam.com/channels/L-q7_WvISkw0Ox9FRBBzmw.html File link:
MIND-BLOWING VBA XPath SECRETS You Need to Know
Переглядів 104Місяць тому
Please contact me for any project or VBA Automation. Contacts: Fiverr: www.fiverr.com/s/5rdZD6k Email: 1997ismail.hosen@gmail.com WhatsApp: 8801515649307 LinkedIn: www.linkedin.com/in/md-ismail-hosen-b77500135/ Facebook: mdismail.hosen.7 UA-cam: ua-cam.com/channels/L-q7_WvISkw0Ox9FRBBzmw.html File link:
Traversing XML Tree Structure
Переглядів 75Місяць тому
Please contact me for any project or VBA Automation. Contacts: Fiverr: www.fiverr.com/s/5rdZD6k Email: 1997ismail.hosen@gmail.com WhatsApp: 8801515649307 LinkedIn: www.linkedin.com/in/md-ismail-hosen-b77500135/ Facebook: mdismail.hosen.7 UA-cam: ua-cam.com/channels/L-q7_WvISkw0Ox9FRBBzmw.html File link:
Load XML From String
Переглядів 39Місяць тому
Please contact me for any project or VBA Automation. Contacts: Fiverr: www.fiverr.com/s/5rdZD6k Email: 1997ismail.hosen@gmail.com WhatsApp: 8801515649307 LinkedIn: www.linkedin.com/in/md-ismail-hosen-b77500135/ Facebook: mdismail.hosen.7 UA-cam: ua-cam.com/channels/L-q7_WvISkw0Ox9FRBBzmw.html File link:
Loading XML From File Using Excel VBA
Переглядів 143Місяць тому
Please contact me for any project or VBA Automation. Contacts: Fiverr: www.fiverr.com/s/5rdZD6k Email: 1997ismail.hosen@gmail.com WhatsApp: 8801515649307 LinkedIn: www.linkedin.com/in/md-ismail-hosen-b77500135/ Facebook: mdismail.hosen.7 UA-cam: ua-cam.com/channels/L-q7_WvISkw0Ox9FRBBzmw.html File link:
Keep Custom Controls In your Collection: VBA Userform
Переглядів 109Місяць тому
Please contact me for any project or VBA Automation. Contacts: Fiverr: www.fiverr.com/s/5rdZD6k Email: 1997ismail.hosen@gmail.com WhatsApp: 8801515649307 LinkedIn: www.linkedin.com/in/md-ismail-hosen-b77500135/ Facebook: mdismail.hosen.7 UA-cam: ua-cam.com/channels/L-q7_WvISkw0Ox9FRBBzmw.html File link:
EXPOSED The Secret To Checking Your Excel Version!
Переглядів 72Місяць тому
Please contact me for any project or VBA Automation. Contacts: Fiverr: www.fiverr.com/s/5rdZD6k Email: 1997ismail.hosen@gmail.com WhatsApp: 8801515649307 LinkedIn: www.linkedin.com/in/md-ismail-hosen-b77500135/ Facebook: mdismail.hosen.7 UA-cam: ua-cam.com/channels/L-q7_WvISkw0Ox9FRBBzmw.html File link:
List all named range in one line of VBA code
Переглядів 812 місяці тому
Please contact me for any project or VBA Automation. Contacts: Fiverr: www.fiverr.com/s/5rdZD6k Email: 1997ismail.hosen@gmail.com WhatsApp: 8801515649307 LinkedIn: www.linkedin.com/in/md-ismail-hosen-b77500135/ Facebook: mdismail.hosen.7 UA-cam: ua-cam.com/channels/L-q7_WvISkw0Ox9FRBBzmw.html File link:
Create Multiple Named Ranges in SECONDS with This Simple Trick!
Переглядів 662 місяці тому
Please contact me for any project or VBA Automation. Contacts: Fiverr: www.fiverr.com/s/5rdZD6k Email: 1997ismail.hosen@gmail.com WhatsApp: 8801515649307 LinkedIn: www.linkedin.com/in/md-ismail-hosen-b77500135/ Facebook: mdismail.hosen.7 UA-cam: ua-cam.com/channels/L-q7_WvISkw0Ox9FRBBzmw.html File link:
A complete Restaurant management Tool in Excel with Userform Demo
Переглядів 942 місяці тому
Please contact me for any project or VBA Automation. Contacts: Fiverr: www.fiverr.com/s/5rdZD6k Email: 1997ismail.hosen@gmail.com WhatsApp: 8801515649307 LinkedIn: www.linkedin.com/in/md-ismail-hosen-b77500135/ Facebook: mdismail.hosen.7 UA-cam: ua-cam.com/channels/L-q7_WvISkw0Ox9FRBBzmw.html File link:
My 415 Dollars Lambda
Переглядів 692 місяці тому
Please contact me for any project or VBA Automation. Contacts: Fiverr: www.fiverr.com/s/5rdZD6k Email: 1997ismail.hosen@gmail.com WhatsApp: 8801515649307 LinkedIn: www.linkedin.com/in/md-ismail-hosen-b77500135/ Facebook: mdismail.hosen.7 UA-cam: ua-cam.com/channels/L-q7_WvISkw0Ox9FRBBzmw.html File link:
Get Data From Active Workbook Sheets (Not Table) Using Power Query
Переглядів 1332 місяці тому
Get Data From Active Workbook Sheets (Not Table) Using Power Query
Get File Path or Folder Path Dynamically Using Formula to build Dynamic Power Query
Переглядів 1672 місяці тому
Get File Path or Folder Path Dynamically Using Formula to build Dynamic Power Query
Multi Selectable Data Validation List Selector in Excel
Переглядів 2683 місяці тому
Multi Selectable Data Validation List Selector in Excel
Watch this before raising Custom Error In Class Module Mac
Переглядів 643 місяці тому
Watch this before raising Custom Error In Class Module Mac
Dynamically Search and Navigate in excel
Переглядів 1533 місяці тому
Dynamically Search and Navigate in excel
Dynamic Dependent Dropdown List In Excel Demo
Переглядів 5633 місяці тому
Dynamic Dependent Dropdown List In Excel Demo
Win and Mac Folder Selector Demo Final
Переглядів 294 місяці тому
Win and Mac Folder Selector Demo Final
Win and Mac File Selector Demo
Переглядів 274 місяці тому
Win and Mac File Selector Demo
Win and Mac Compatible File Selector
Переглядів 444 місяці тому
Win and Mac Compatible File Selector
Hide Password and Important Info Cell in Excel
Переглядів 805 місяців тому
Hide Password and Important Info Cell in Excel
Compatible Folder Picker Both For Windows and Mac
Переглядів 335 місяців тому
Compatible Folder Picker Both For Windows and Mac
Extract Search Results from Website to Excel: One click solution
Переглядів 725 місяців тому
Extract Search Results from Website to Excel: One click solution
Stop Copy Pasting If you want to write clean Code
Переглядів 1205 місяців тому
Stop Copy Pasting If you want to write clean Code
Stop Making These Mistakes In Your VBA Code To Write Clean Code
Переглядів 3425 місяців тому
Stop Making These Mistakes In Your VBA Code To Write Clean Code
Add a Calculated Column In A Table Using Office Script
Переглядів 3006 місяців тому
Add a Calculated Column In A Table Using Office Script
Property Data Directly in Excel from ATTOM API
Переглядів 1266 місяців тому
Property Data Directly in Excel from ATTOM API

КОМЕНТАРІ

  • @dumdumbringgumgum542
    @dumdumbringgumgum542 12 днів тому

    You a champ for this

  • @luismagana3815
    @luismagana3815 20 днів тому

    How can we make as a Vlookup, where a value in a excel file matching with other excel files ?

    • @mdismailhosen8280
      @mdismailhosen8280 20 днів тому

      Office script works on a single excel file. You will need power automate and office script then.

    • @luismagana3815
      @luismagana3815 20 днів тому

      @mdismailhosen8280 do You have a video about that?

    • @mdismailhosen8280
      @mdismailhosen8280 20 днів тому

      Not at the moment.

  • @akshayjain4538
    @akshayjain4538 21 день тому

    Hello Ismail , can we connect on email, I need this software

  • @samyezzat2706
    @samyezzat2706 23 дні тому

    hi brother can you send it to me by excel sheet please

  • @PrasadGokhale-x1w
    @PrasadGokhale-x1w Місяць тому

    Great video series! 👍

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

    Superb Brother !!!!

  • @bob-tina
    @bob-tina Місяць тому

    Goede tip in korte video!

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

    Great guide, Ismail 👏🏽👏🏽

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

    I believe there is a better and shorter path which is (LA - Phoenix - Denver - St. Louis: 9+15+19 = 43)

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

    What to do if I need NOT one, but ALL URLs (or href values) from your example table to be extracted as table? In other words, I'd like to keep the original table that has activate() as 1st row, but add another column with corresponding href values?

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

      You need to use RowSelector option of Html.Table. check the documentation.

  • @svgkiran
    @svgkiran 2 місяці тому

    Can we update the names?

    • @mdismailhosen8280
      @mdismailhosen8280 2 місяці тому

      What you mean by update?

    • @svgkiran
      @svgkiran 2 місяці тому

      @mdismailhosen8280 Renaming to already named ranges.

    • @mdismailhosen8280
      @mdismailhosen8280 2 місяці тому

      @@svgkiran I guess it will create a new one. With more vba code we can add renaming functionality though.

  • @rubenmunozverdu7528
    @rubenmunozverdu7528 2 місяці тому

    Niiiiiice, I never thought of "cheating" and calling the function for "other workbooks" using the path of the current workbook.

    • @mdismailhosen8280
      @mdismailhosen8280 2 місяці тому

      Yes. When you don’t have a way you have to be creative.

  • @benlinford_work
    @benlinford_work 2 місяці тому

    Great job!

  • @lawrenceNG-k3q
    @lawrenceNG-k3q 2 місяці тому

    Great 👍🏾

  • @larissakaur59
    @larissakaur59 3 місяці тому

    This is exactly what I was looking for. Thank you. I agree with the comment below. I suggest you speak and show the steps a little slower. I had to rewind a few times to catch what you were doing.

  • @arun4846
    @arun4846 3 місяці тому

    Superb❤❤❤

  • @arun4846
    @arun4846 3 місяці тому

    Superb❤❤❤

  • @RPApapq9038
    @RPApapq9038 3 місяці тому

    Hi Ismail, I'm very interested in the next video about matching arrays. Thank you in advance!

  • @codekabinettcomen
    @codekabinettcomen 3 місяці тому

    You made an error in your code. According to VBA documentation: "The range 0-512 is reserved for system errors; " You should not have used 13 as error number for a custom error. - Nonetheless, I agree that the behavior is inconsistent on the Mac. What happens if you use an error number suitable for custom errors?

    • @mdismailhosen8280
      @mdismailhosen8280 3 місяці тому

      I know that range is for system reserved, but sometimes using that error number with a custom message resonates more. Instead of saying that there is a Type mismatch, I can say that we expect a long, but you have passed something different. That's why I kept 13. When I am running the same thing on the windows it is saying Custom Error even in the class module. Also, If you see the module example in the Mac version, then you will see that it is showing the custom description instead of a Type mismatch. So, it is more relevant to the class module and Mac issue than the error number. If I use VbObjectError then it just throws a runtime error with the description "Method RaiseCustomError' of object 'Class1' failed".

  • @eng-us
    @eng-us 3 місяці тому

    Thank you Ismail Vai, Navigator How did you made? Your Videos are informative

    • @mdismailhosen8280
      @mdismailhosen8280 3 місяці тому

      Using VBA code with userform and class modules.

  • @NormanJazzStyle
    @NormanJazzStyle 3 місяці тому

    Code example, please...

    • @mdismailhosen8280
      @mdismailhosen8280 3 місяці тому

      It's a paid tool developed by me. It's not available at free of cost.

  • @bigpicture8309
    @bigpicture8309 3 місяці тому

    well done! attention to every detail on the video - this is how we must teach!!

  • @alexandre8869
    @alexandre8869 3 місяці тому

    Please next time, remove the echo because it’s too much.

    • @mdismailhosen8280
      @mdismailhosen8280 3 місяці тому

      Trying to make it better day by day. Thanks for your input.

  • @mostainbillah
    @mostainbillah 3 місяці тому

    Dear Sir , You have Reply The Comment For Accessing file at Another Tutorial : Working Between Two Excel Workbook 1. Active Workbook 2. Close Master Workbook . I need Searchable Data from Close workbook , Search Reference Will Active Workbook Active Workbook C2 Cell Value . Details: 1. Get data From all sheets of Close masterWorkbook to Active Workbook . 2.Criteria : Active Workbook C2 Cell Value reference , 3.Get All Searchable data from close workbook with Entire Row . 4. Past destination : Active Workbook last row , Could you Please MAke a Tutorial For Me , Please Check your Mail ,

  • @mostainbillah
    @mostainbillah 3 місяці тому

    Sir ,The greatest & valuable tutorial for Excel learners. I am Grateful to you for getting the tutorial , I have Searching As type Tutorial In UA-cam , So not Available . So A request to you , I have Need something Different . I want , Get data From Close masterWorkbook all sheets to Active Workbook .Criteria : Active Workbook C2 Cell Value reference , Get All Search data with Entire Row . (Which Cell Found the Criteria , Cell Value Copy Full Row , And Paste At Active Workbook last row , Could you Please MAke a Tutorial For Me ,

    • @mdismailhosen8280
      @mdismailhosen8280 3 місяці тому

      Sorry i don't understand completely. Please share files via email and explain the problem.

    • @mostainbillah
      @mostainbillah 3 місяці тому

      @@mdismailhosen8280 Pleae Check Your Mail : Dear Sir , Working Two Excel Workbook 1. Active Workbook 2. Close Master Workbook . I need Searchable Data from Close workbook , Search Reference Will Active Workbook Active Workbook C2 Cell Value . Details: 1. Get data From all sheets of Close masterWorkbook to Active Workbook . 2.Criteria : Active Workbook C2 Cell Value reference , 3.Get All Searchable data from close workbook with Entire Row . 4. Past destination : Active Workbook last row , Could you Please MAke a Tutorial For Me ,

  • @fabianortizs
    @fabianortizs 3 місяці тому

    OMG thanks from Venezuela

  • @wazatna
    @wazatna 3 місяці тому

    Well, this just saved me about 8 hours of banging a head against a wall, so thank you!

    • @mdismailhosen8280
      @mdismailhosen8280 3 місяці тому

      Thank you so much. Your words will keep me inspired to record more videos. Glad to help.

  • @danp6101
    @danp6101 3 місяці тому

    Hi Ismail I sent you the file in an Email.

    • @mdismailhosen8280
      @mdismailhosen8280 3 місяці тому

      Thank you. Received it. Will let you know.

    • @danp6101
      @danp6101 3 місяці тому

      @@mdismailhosen8280 Ok

    • @mdismailhosen8280
      @mdismailhosen8280 3 місяці тому

      Just checked. Excellent job. I may record a video for this. Is that okay?

    • @danp6101
      @danp6101 3 місяці тому

      @@mdismailhosen8280 Yeah sure

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

    Public Function StrMatchRegExp(Str,RegexPattern) as Boolean: Dim Rx as RegExp: Set Rx = New RegExp: Dim RxMatch as MatchCollection: Rx.Pattern=RegexPattern:Set RxMatch = Rx.Execute(Str): If RxMatch.Count=1 Then: StrMatchRegExp=(Str=RxMatch.Item(0)): Else: StrMatchRegExp=False: End If: End Function 😁

    • @mdismailhosen8280
      @mdismailhosen8280 3 місяці тому

      Excellent way. Do you know that VBScript is going to be removed from Windows? techcommunity.microsoft.com/t5/windows-it-pro-blog/vbscript-deprecation-timelines-and-next-steps/ba-p/4148301 . Also it won't work in Mac.

    • @thesilverkey
      @thesilverkey 3 місяці тому

      @@mdismailhosen8280 , Sorry, yes VBS. And with it, the RegExp library. That is a shame. There has to be a .NET we can use. I use System.Collections.Stack a fair amount. And .Queue once. I really like RegExp in VSCode and Notepad++

    • @mdismailhosen8280
      @mdismailhosen8280 3 місяці тому

      It will be removed in multiple phases. But what about Mac compatibility?

    • @thesilverkey
      @thesilverkey 3 місяці тому

      @@mdismailhosen8280 There is apparently a set of REGEX worksheet functions for Excel 365. I have 365 but not the functions. Maybe I stripped Windows down too much. I have Macs too, WorksheetFunction would be great.

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

    You are adding value with these videos, so thank you. If you get bored, :) do a video explaning why an Implementer of an Interface would have methods/properties for both the Interface AND the Default-Interface (so, the same method/property twice - one prepended with "I..._" and the other not prepended with anything.) I see it all the time, with the Private Interface_ version getting it's value from the Public Default Get... and it makes no sense to me. I assume it is to expose the Setter. But then why is the non-prepended Getter needed? Too long in Procedural Mode, me.

    • @mdismailhosen8280
      @mdismailhosen8280 3 місяці тому

      Okay. I will add this comment in my video ideas list. Just to answer shortly. You can use the implementer class as an interface as well as you can use that as a separate entity. So if i have a IValidator class and implementor as IntegerValidator then i can use IntegerValidator as IValidator or as IntegerValidator. So, if we don't have both getter and setter then when you will use it as IntegerValidator then you can't set the properties of that object right? But if you want to use IntegerValidator as IValidator only then you can remove those default getter and setter and only keep the Interface (IValidator_....) one's. But still you need private module level variable to set the property (Not method).

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

    Hi Ismail. I figured out away to drag and drop controls on a Userform. You can also use a Class with a custom event that will work multiple created controls at runtime. I can send you the code if you're interested. I would like to know if you can make a video on how to use the Label1_BeforeDragOver event and Label1_BeforeDropOrPaste event. Thanks

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

    Thank you for the video.

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

    That's a clever way of renaming column headers. Thank you. It's a pity that many Power Query learners don't know your channel.

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

      Thank you. Don't forget to share to your network so that they can learn too.

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

    Thanks for the new ideas. I like that one @4:25: where you forced it to a list type.

  • @404-nulll
    @404-nulll 4 місяці тому

    In 2024, and this video still helped me a lot, thank you very much 👍

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

    Amazing organizing tricks ismail. I'm wondering how you built that searchable utility box. Does that work only within vbe environment or in normal excel interface too? I would love to build that and add my macros to it on a searchable basis 7:55

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

      You can search anything but the example form is just for importing and inserting code.

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

    Excellent information! Thank you for sharing :-)

  • @张武王
    @张武王 5 місяців тому

    Thank you for sharing this video!

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

    First red flag is missing Option Explicit 😄 My coding style is to keep all executable code outside of worksheet l object. Worksheet_Change would only call sub stored in regular module passing the Target.

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

      I agree with you about the Option Explicit. What's the benefit of having all code in a general module?

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

      @mdismailhosen8280 I don't know if that's good enough reason but when someone deletes worksheet then you loose all code. When the whole code is just one liner calling procedure kept in a module then the whole executable code is preserved. I guess it's rather a personal preference like using a Hungarian notation but makes me feel a little more well organized.

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

      @@fufumaliniak2927 Good point about deleting sheet and losing the code. It’s more of a personal preference.

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

    Your channel is very interesting but I recommend that you improve your English. It's a pity that all your knowledge isn't properly conveyed to your audience due to your limitations in English. Anyhow, you have an outstanding knowledge of Excel and VBA.

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

      Thank you for your suggestion. Can you check my latest video please and suggest?

  • @benlinford_work
    @benlinford_work 6 місяців тому

    When placing code in the worksheet object, do you always explicitly reference the sheet? I'm thinking within the context of *Worksheet_Change* where you are only dealing with references to the current worksheet (same worksheet by nature).

    • @mdismailhosen8280
      @mdismailhosen8280 6 місяців тому

      Yes. Because if you don't then it will use activesheet but you can trigger a worksheet change event from vba and active sheet could be different one.

  • @benlinford_work
    @benlinford_work 6 місяців тому

    You asked if there was anything you might have missed... And you only missed it because it wasn't present... *Code commentary* might have helped you to understand the code better when you were first attempting to understand what the code's objective(s) is/were. But based on all of the issues you identified, I'm not surprised that this wasn't in place and I'm sure this will feature in your refactored example where you demonstrate clear labelling via comments, sub routine and function naming convention etc.

    • @mdismailhosen8280
      @mdismailhosen8280 6 місяців тому

      Thanks for pointing that out. For this one we definitely need comments. But when we will refactor it out we will need lesser comments.

  • @benlinford_work
    @benlinford_work 6 місяців тому

    Excellent analysis MD! 📊 Utilisation of the Difference Checker to identify the pattern visually, side by side efficiently as you have done so, to explore the possibility of refactoring into a concise and reusable routine that can take parameters and utilise maths and a loop to satisfy the pattern is great (looking forward to the next video). If anybody who is watching this is considering using MD's services, as a fellow Excel and VBA enthusiast, I can vouch that this man knows Excel solutions. 🏆

  • @wplaunchers
    @wplaunchers 6 місяців тому

    Even though I didn't understand anything(I'm WP dev), I can say the presentation is superb!!

  • @welovespeadsheet
    @welovespeadsheet 6 місяців тому

    Excellent 👌

  • @erendiz79
    @erendiz79 6 місяців тому

    your code doesn't work when you select multiple cells.

    • @mdismailhosen8280
      @mdismailhosen8280 6 місяців тому

      Check this video: ua-cam.com/video/pXfBpd1OpwU/v-deo.html

  • @yeahnick4260
    @yeahnick4260 6 місяців тому

    Can you explain, where the difference is between methods and custom events? the way u wrote your code can also be done with methods. and it would be even neater. besides accessing to events like open_Workbook , what is the main advantage of events over class methods?

    • @mdismailhosen8280
      @mdismailhosen8280 6 місяців тому

      You can use the same code for bunch of controls. You can definitely call a sub for each control events but still you are duplicating code. I think i have another video on handling multiple textbox events with one single class. Check that to see the usage.

    • @yeahnick4260
      @yeahnick4260 6 місяців тому

      @@mdismailhosen8280 Hi, yes, on that specific point i see the benefit. But my question was about generate custom events, outside Userforms at all. my point is this: instead of calling the Code within the EventCode like "RaiseEvent DoMyCode()" i could simply use that a Class and call that same Code as a method: myClass.DoMyCode() Like i said, besides that we can call Existing Events from Userforms or WOrksheets etc. the Mainquestion is, When do i use Class Method, and when a self written Event?

    • @mdismailhosen8280
      @mdismailhosen8280 6 місяців тому

      Okay. I get what you mean. Now let me ask you this: Does textbox events help you to write custom code? For example we have one textbox for pin code. Now you have validation that it must be 4 digit numeric. Now you use keydown event for that. And you write your custom validation code on it. You have another textbox for Let's say Firstname and you want to allow only Alphabet then your validation will be different right? But you can see that the event is same and the event is being raised by msforms internal. You are just following their contract. And the contract is every time user press something run that command.

    • @mdismailhosen8280
      @mdismailhosen8280 6 місяців тому

      Now consider your case: you want to use sub right instead of event. So you can put the sub either in the custom class or in form. If you put the code in the custom class then you are fixing the implementation details. Now you control what kind of validation you want right. Userform control doesn’t have the flexibility to have different validations for different textbox as event or sub will be raised by the custom class.

    • @mdismailhosen8280
      @mdismailhosen8280 6 місяців тому

      Now consider the second option. Put the sub in the userform. This time you can give user the flexibility to have different validation. But now you need to have userform instance in the custom class to call the sub that you have defined in the custom class. That's one dependency issue. The second issue is that Let's say i do have two textbox with two different validation. So how do you want to specify two sub with same name in the same userform? Third isdue is that you need to know what is the sub that you are calling from custom class of that userform? Fourth issue is that you need to remember what should be the name of the sub that you are using in the custom class and you need to keep that same name in the userform. So you can see the userform code and custom class code is tightly coupled.

  • @b99eu
    @b99eu 6 місяців тому

    Thanks for this. First time I understood the need and usage of implementations.

  • @nazmulhoque95
    @nazmulhoque95 6 місяців тому

    Best of luck brother