ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Macro to change worksheets in the same workbook (https://www.excelbanter.com/excel-discussion-misc-queries/51224-macro-change-worksheets-same-workbook.html)

James C

Macro to change worksheets in the same workbook
 

I am in sheet 1. I need a macro that will move me to sheet 2.
Can someone provide the code?

Thanx!

- Jim


--
James C
------------------------------------------------------------------------
James C's Profile: http://www.excelforum.com/member.php...o&userid=12114
View this thread: http://www.excelforum.com/showthread...hreadid=477584


swatsp0p

Macro to change worksheets in the same workbook
 

How will you trigger the code? Button? Keystroke? Other method?

More info, please.

The basic line of code is:
Sheets("sheet2").Select
where "sheet2" is the name of your sheet 2.


--
swatsp0p


------------------------------------------------------------------------
swatsp0p's Profile: http://www.excelforum.com/member.php...o&userid=15101
View this thread: http://www.excelforum.com/showthread...hreadid=477584


Kassie

Macro to change worksheets in the same workbook
 
Use .activate, preceded by the name of the sheet you want to activate
--
ve_2nd_at. Randburg, Gauteng, South Africa


"James C" wrote:


I am in sheet 1. I need a macro that will move me to sheet 2.
Can someone provide the code?

Thanx!

- Jim


--
James C
------------------------------------------------------------------------
James C's Profile:
http://www.excelforum.com/member.php...o&userid=12114
View this thread: http://www.excelforum.com/showthread...hreadid=477584




All times are GMT +1. The time now is 12:50 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com