Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Module 1 - Subscript out of range error


Set wbBook = Workbooks("C:\Temp\Charts_ChgAll2.xls")
-------------------------
I moved all my macro code from "Thisworkbook" to "Module1" in the sam
workbook. The code was running before I moved it.

Now I am getting a "Subscript out of range error" on the above line?

--------------------------------------------------------------
I am strangely confused and in the deep end too.

Craig

--
Craig
-----------------------------------------------------------------------
Craigm's Profile: http://www.excelforum.com/member.php...fo&userid=2438
View this thread: http://www.excelforum.com/showthread.php?threadid=38276

  #2   Report Post  
Posted to microsoft.public.excel.programming
ben ben is offline
external usenet poster
 
Posts: 232
Default Module 1 - Subscript out of range error

that sounds to me like it just can't find the workbook, verify the location
of the workbook and that the name is not mistyped. (Also try opening it first)

--
When you lose your mind, you free your life.


"Craigm" wrote:


Set wbBook = Workbooks("C:\Temp\Charts_ChgAll2.xls")
-------------------------
I moved all my macro code from "Thisworkbook" to "Module1" in the same
workbook. The code was running before I moved it.

Now I am getting a "Subscript out of range error" on the above line?

--------------------------------------------------------------
I am strangely confused and in the deep end too.

Craigm


--
Craigm
------------------------------------------------------------------------
Craigm's Profile: http://www.excelforum.com/member.php...o&userid=24381
View this thread: http://www.excelforum.com/showthread...hreadid=382769


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Module 1 - Subscript out of range error


Set wbBook = Workbooks("C:\Temp\Charts_ChgAll2.xls")

for the above code to work,file Charts_ChgAll2.xls has to be opened
when running the macro , and also code should be.

Set wbBook = Workbooks("Charts_ChgAll2.xls")

make sure that file Charts_ChgAll2.xls, is kept opened before running
the macro


--
anilsolipuram
------------------------------------------------------------------------
anilsolipuram's Profile: http://www.excelforum.com/member.php...o&userid=16271
View this thread: http://www.excelforum.com/showthread...hreadid=382769

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
Subscript out of range error moglione1 Excel Discussion (Misc queries) 2 August 30th 05 01:21 PM
Type Mismatch error & subscript out of range error Jeff Wright[_2_] Excel Programming 3 May 14th 05 07:14 PM
Subscript Out Of Range Error? Michael Vaughan Excel Programming 3 November 9th 04 11:35 AM
Subscript out of range error enz[_2_] Excel Programming 3 May 26th 04 02:20 PM
Subscript out of range error Tom Ogilvy Excel Programming 0 December 10th 03 12:48 AM


All times are GMT +1. The time now is 09:53 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"