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: 11
Default Selecting worksheets


How can I name the activeworsheet in the beginning of a macro so I can then
get back to that worksheet from another sheet later in the macro? I am
constantly adding sheets to this workbook, so just telling the macro to
select sheet2 just won't work. I've tried Setting the sheet, saying: "Set
mysheet = ActiveSheet" and then trying to select mysheet later in the macro
(using "Sheets(mysheet).Select") when I want to get back to that sheet, but I
keep getting a runtime error 13, type mismatch. When I debug, it brings me to
the code were I am trying to get back to that worksheet. I'm still learning
this, and taking quite a few lumps. I've pretty much got the macro running
beautifully, except for the fact that I keep needing to re-select the sheet I
want to work within. It's a bit clumsy, and I'd like to try to make it run a
bit smoother.

Any help would be appreciated.
 
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
Selecting different Worksheets from a Loop ironhydroxide Excel Programming 4 May 22nd 09 09:19 PM
Selecting across worksheets JMS Excel Discussion (Misc queries) 1 July 14th 05 10:44 PM
Selecting worksheets into groups? Ørjan Stien Excel Programming 3 March 24th 05 06:51 AM
Selecting WorkSheets Jordan Excel Programming 3 February 25th 05 07:10 PM
selecting worksheets Matthew Kramer Excel Programming 1 August 16th 04 10:39 PM


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