Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Private Sub CommandButton1_Click()
Dim VBComp As VBComponent Dim FName As String With Workbooks("Custom Button.xls") FName = .Path & "\codes.txt" End With Workbooks("PERSONAL.xls").VBProject.VBComponents.I mport FName End Sub The above code adds a module to the PERSONAL.XLS successfully only when PERSONAL.XLS is showing in the VBE, however if PERSONAL.XLS is NOT showing in the VBE, I get the debug error "Subscript out of Range" and it highlights the below part of the code. How do I show PERSONAL.XLS in the VBE so my code will work? Workbooks("PERSONAL.xls").VBProject.VBComponents.I mport FName Thank you Todd Huttenstine |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how do I stop PERSONAL.XLSB from showing every time XL opens? | Excel Discussion (Misc queries) | |||
How to fix my spreadsheet from showing formula to showing answer | Excel Discussion (Misc queries) | |||
Showing/ not showing "getting started" when excel starts | Excel Discussion (Misc queries) | |||
Personal macro workbook and personal.xls | Excel Discussion (Misc queries) |