Class Modules in VBA | VBA tutorial

preview_player
Показать описание
This video explains the class modules in VBA. This is part of VBA tutorial

VBA Class modules, VBA charts basics, Connect to SQL Server using ADO in VBA, Enums and constants in VBA, File System Object in Excel VBA, How to open a file in excel VBA, Error Handling in Excel VBA, Messagebox in Excel VBA, InputBox in Excel VBA, Array in Excel VBA, how to find top 3 values in VBA, how to create user form in VBA,Date and time in excel VBA, strings in excel VBA, how to remove duplicates in VBA excel, how to use for loop in VBA, how to use offset in excel VBA, how to find last row in VBA, excel VBA introduction for beginners, excel VBA, excel VBA tutorial, excel VBA tutorial for beginners, excel VBA full course, excel VBA userform, excel VBA advanced, excel VBA macro, excel VBA course, excel VBA code, VBA tutorial for beginners with examples
Рекомендации по теме
Комментарии
Автор

Hi.
I have an issue that I need help with.
I created a class module with my own custom Button click_event.
The class uses Public withevents.
Plus my own custom Mouse_Down event.
This is for Activex buttons that will do something when I click on them or right click on them.
There are up 480 buttons at one time that's why I used the class so I didn't have use the click_event for each one.
I have Other modules that will performer other actions.
Everything works fine.
The Issue I am having is when I click on the Save icon up on the command bar.
It says it saved to my PC but when I go close it buy hitting the X in the corner or by going to the left and click on the close.
I get the Popup message do you want to save this file. with the options. Save, Don't Save, Cancel.
No matter how many times I click on the save file icon it doesn't seem to save the file.
I know it has something do with the class module because I Ran the macros without it calling the class all the other modules were called and the functions were performed.
the only thing that doesn't work is the Button Click_Event and the MouseDown_Event which is controlled by the Class Module.
Now when Click on the save icon it saves fine I don't get the popup message that says do you want to save this file.
As soon as I reactivate the Class Module and try to save it then the popup message is back.
Oh I Also have the Class to Set MyClass = Nothing After the Class is Called and on the WorkBook_Events BeforeClose and AfterSave_Event.
I Still Get the Popup.
Do you have any suggestions.
Thanks.

danp
Автор

How to use Set property and WithEvent, RaiseEvent in Class Module.. Please make Video on same topic..

KuldeepSingh-nqvi