ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   making a different sheet active (https://www.excelbanter.com/excel-programming/403221-making-different-sheet-active.html)

Charlie

making a different sheet active
 
On the currently active sheet cell F2 has the name of the sheet I want to
make active. How do I activate this sheet?
thanks,
ck


Gary Keramidas

making a different sheet active
 
you can try this

worksheets(range("F2").Value).activate

--


Gary


"Charlie" wrote in message
...
On the currently active sheet cell F2 has the name of the sheet I want to
make active. How do I activate this sheet?
thanks,
ck




Rick Rothstein \(MVP - VB\)

making a different sheet active
 
This should do what you asked...

Worksheets(Range("F2").Value).Activate

Rick


"Charlie" wrote in message
...
On the currently active sheet cell F2 has the name of the sheet I want to
make active. How do I activate this sheet?
thanks,
ck



Dave Peterson

making a different sheet active
 
on error resume next
activeworkbook.worksheets(activesheet.range("F2"). value).select
if err.number < 0 then
beep
end if
on error goto 0

Charlie wrote:

On the currently active sheet cell F2 has the name of the sheet I want to
make active. How do I activate this sheet?
thanks,
ck


--

Dave Peterson


All times are GMT +1. The time now is 04:49 AM.

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