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: 33
Default Rookie Question - Activating Worksheets

This simple issue nags at me. In a larger macro, I start off activating a
worksheet and the current region, as follows:

ThisWorkbook.Activate
Worksheets("Transactions").Range("A1").Activate

[This inelegant code is about my fourth iteration at getting this right.]

I will run the macro from the VBA window, and if the Transactions worksheet
is not the active sheet when I start the macro, I will get the error message:
Activate method of Range class failed.

Seems to me that my code should work regardless of which workbook or
worksheet is active, but obviously I'm not understanding something. What is
it?

Thanks, John

 
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
rookie question Nevermind Charts and Charting in Excel 2 June 12th 07 05:57 PM
Excel Rookie Question Ron Excel Programming 5 February 24th 06 05:52 PM
VBA Question (rookie issue) Scott Wagner Excel Programming 7 February 19th 06 11:29 PM
VBA rookie question - listbox and GOTO Harald Staff[_4_] Excel Programming 3 September 7th 03 04:55 PM


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