Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 120
Default Activate WorkBook

If that is your exact code, then the problem is that you haven't
initialized FileNameNew. You should probably have a line that says
"FileNameNew = nameOfMyFile"

Cheers,
Jason Lepack

geebee noSPAMs wrote:
hi,

I am getting a "runtime error 9: subscript out of range" when I try to open
a workbook:

Dim FileNameNew as String
Workbooks.Open FileNameNew
Windows(FileNameNew).Activate

The FileNameNew itself has an OnOpen event. Could this be causing the
problem?

How can I get around this? I just want to be able to Activate the
FileNameNew without going through this error message and possibly its OnOpen
event.

Thanks in advance,
geebee


Reply
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
Workbook.Activate / Window.Activate problem Tim[_44_] Excel Programming 3 February 4th 06 12:38 AM
Activate Workbook Dolphinv4 Excel Discussion (Misc queries) 2 October 22nd 05 01:45 PM
Activate Other Workbook pauluk[_37_] Excel Programming 16 April 20th 04 07:02 PM
Activate Workbook Molly Johnson Excel Programming 1 February 10th 04 06:09 PM
Activate Workbook Fred[_16_] Excel Programming 1 December 2nd 03 06:15 PM


All times are GMT +1. The time now is 07:34 PM.

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

About Us

"It's about Microsoft Excel"