caramel_delight
New Member
- Joined
- Dec 24, 2020
- Messages
- 4
- Office Version
- 2011
- Platform
- Windows
HI All,
i am new to VBA
I have been searching through the internet but cant find specifically what i am looking for
I want to remove specific modules with a VBA in all open workbooks ... e.g. module 1, module 2
However, i don't want to remove the modules within the workbook with all my macros to make this happen.
What i am trying to do is sent an excel spreadsheet to my clients. when they run the macro it will remove the modules from their workbook and replace them with new ones
I managed to import and export the modules but struggling to remove the original modules in my clients workbooks
I have some codes
Sub RemoveMod()
Dim wbk As Workbook
' Loop through open workbooks
For Each wbk In Workbooks
' Exclude source workbook, personal macro workbook and add-ins
If wbk.Name <> ThisWorkbook.Name And wbk.Name <> "PERSONAL.XLSB" And wbk.IsAddin = False Then
However, i am not sure what codes to use next
Any suggestions?
i am new to VBA
I have been searching through the internet but cant find specifically what i am looking for
I want to remove specific modules with a VBA in all open workbooks ... e.g. module 1, module 2
However, i don't want to remove the modules within the workbook with all my macros to make this happen.
What i am trying to do is sent an excel spreadsheet to my clients. when they run the macro it will remove the modules from their workbook and replace them with new ones
I managed to import and export the modules but struggling to remove the original modules in my clients workbooks
I have some codes
Sub RemoveMod()
Dim wbk As Workbook
' Loop through open workbooks
For Each wbk In Workbooks
' Exclude source workbook, personal macro workbook and add-ins
If wbk.Name <> ThisWorkbook.Name And wbk.Name <> "PERSONAL.XLSB" And wbk.IsAddin = False Then
However, i am not sure what codes to use next
Any suggestions?