LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 237
Default Showing PERSONAL.XLS

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how do I stop PERSONAL.XLSB from showing every time XL opens? Kerry S Excel Discussion (Misc queries) 1 January 2nd 10 02:40 PM
How to fix my spreadsheet from showing formula to showing answer SimplyQuick Excel Discussion (Misc queries) 4 October 7th 08 10:00 PM
Showing/ not showing "getting started" when excel starts Ask Excel Discussion (Misc queries) 1 July 20th 05 04:20 PM
Personal macro workbook and personal.xls John Kilkenny Excel Discussion (Misc queries) 1 June 14th 05 09:43 PM


All times are GMT +1. The time now is 10:54 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"