allen11584
New Member
- Joined
- Nov 9, 2011
- Messages
- 3
Hello,
Please bare with me, I am just learning VB. I have macros in my personal.xlsb file so that they can be accessed from different excel files. I am using the following code to open an excel file:
Dim objExcel As Object
Set objExcel = CreateObject("Excel.application")
objExcel.Visible = True 'if you want to see excel during the program
objExcel.Workbooks.open "c:\25C2-W44-1.xlsm"
The code opens my file (25C2-W44-1.xlsm), but personal.xlsb cannot be accessed. I need to mention that I am opening the above code from another excel file using a command button.
Is there a way to open my file using VB code, but still be able to use the macros from personal.xlsb?
Thank you
Please bare with me, I am just learning VB. I have macros in my personal.xlsb file so that they can be accessed from different excel files. I am using the following code to open an excel file:
Dim objExcel As Object
Set objExcel = CreateObject("Excel.application")
objExcel.Visible = True 'if you want to see excel during the program
objExcel.Workbooks.open "c:\25C2-W44-1.xlsm"
The code opens my file (25C2-W44-1.xlsm), but personal.xlsb cannot be accessed. I need to mention that I am opening the above code from another excel file using a command button.
Is there a way to open my file using VB code, but still be able to use the macros from personal.xlsb?
Thank you