Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Problem activating a sheet

Hi,

I want to activate a sheet in Run time. Can anyone explain to me wh
of the following two bits of code, the first one work but the secon
doesn't.

Set monthSheet = baseBook.Sheets("Month")
monthSheet.Activate

Set currSheet = baseBook.Sheets(sheet)
currSheet.Activate - error message "Out of Range"

Cheers, J

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Problem activating a sheet

Because you haven't enclosed sheet in quotes, so it is looking for a
variable called sheet, which is probably empty?

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"jowatkins " wrote in message
...
Hi,

I want to activate a sheet in Run time. Can anyone explain to me why
of the following two bits of code, the first one work but the second
doesn't.

Set monthSheet = baseBook.Sheets("Month")
monthSheet.Activate

Set currSheet = baseBook.Sheets(sheet)
currSheet.Activate - error message "Out of Range"

Cheers, Jo


---
Message posted from http://www.ExcelForum.com/



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
Conflicts with autorefresh in pivot table activating sheet protect [email protected] Excel Discussion (Misc queries) 15 November 11th 08 05:39 PM
Problem pasting a row from a hidden sheet to the first free row on another visible sheet Didier Poskin Excel Programming 2 January 10th 04 01:18 AM
Can I sort without activating / selecting sheet? Leo Elbertse Excel Programming 2 December 28th 03 06:08 PM
Problem in activating a sheet Neeleshwar Thakur Excel Programming 1 December 18th 03 12:43 PM
Selecting/Activating Control Tools Combobox on Sheet steve Excel Programming 5 October 10th 03 10:38 PM


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