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

Hi,

Below is an extract from a macro, why do I get 'Subscript is out of range',
many thanks

Sub yy()

Dim curWkbk As Workbook

Set curWkbk = Workbooks("wip " & Format(Date, "dd-mm-yy") & ".xls")

End Sub

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Subscript is out of Range

Hi
sounds like this worksheet is not opened. Maybe the space after 'wip' is not
in the workbook name?

--
Regards
Frank Kabel
Frankfurt, Germany

teresa wrote:
Hi,

Below is an extract from a macro, why do I get 'Subscript is out of
range', many thanks

Sub yy()

Dim curWkbk As Workbook

Set curWkbk = Workbooks("wip " & Format(Date, "dd-mm-yy") & ".xls")

End Sub



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Subscript is out of Range

In you previous post, you said you wanted to compare the current workbook
against the most recent workbook. Dave is making an assumption that the
current workbook is named after the current date:

? "wip " & Format(Date, "dd-mm-yy") & ".xls"
wip 19-12-04.xls

If you don't have a workbook open with that name, then you would get an
error.

--
Regards,
Tom Ogilvy


"teresa" wrote in message
...
Hi,

Below is an extract from a macro, why do I get 'Subscript is out of

range',
many thanks

Sub yy()

Dim curWkbk As Workbook

Set curWkbk = Workbooks("wip " & Format(Date, "dd-mm-yy") & ".xls")

End Sub



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 Steve Excel Discussion (Misc queries) 3 April 15th 09 04:01 PM
Subscript out of Range Q John Excel Programming 5 December 14th 04 07:54 AM
Subscript out of range Bill Murphy Excel Programming 1 August 5th 04 08:52 AM
subscript out of range Todd Huttenstine[_3_] Excel Programming 1 June 11th 04 04:08 AM
SubScript Out Of Range. Sam Excel Programming 4 December 21st 03 02:10 AM


All times are GMT +1. The time now is 06:22 AM.

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"