Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I need something that will select cell A1 on the sheet named Holiday and
then return me to the sheet that was active when the code was run. It must go to and select A1 on the Holiday sheet, |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
This macro will do what you asked...
Sub SelectA1OnHolidaySheet() Dim WS As Worksheet Set WS = ActiveSheet On Error GoTo CleanUp Application.ScreenUpdating = False Worksheets("Holiday").Activate Worksheets("Holiday").Range("A1").Select WS.Activate CleanUp: Application.ScreenUpdating = True End Sub But I am curious... why do you think you need to do this? -- Rick (MVP - Excel) "Patrick C. Simonds" wrote in message ... I need something that will select cell A1 on the sheet named Holiday and then return me to the sheet that was active when the code was run. It must go to and select A1 on the Holiday sheet, |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Generally you do not need to select a cell or worksheet in order to manipulate it or retrieve data, selecting can have an adverse effect on performance when you have large sheets or a lot of data. -- The Code Cage Team Regards, The Code Cage Team http://www.thecodecage.com ------------------------------------------------------------------------ The Code Cage Team's Profile: http://www.thecodecage.com/forumz/member.php?userid=2 View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=30124 |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I know that, which is why I asked the OP the question...
"But I am curious... why do you think you need to do this?" -- Rick (MVP - Excel) "The Code Cage Team" wrote in message ... Generally you do not need to select a cell or worksheet in order to manipulate it or retrieve data, selecting can have an adverse effect on performance when you have large sheets or a lot of data. -- The Code Cage Team Regards, The Code Cage Team http://www.thecodecage.com ------------------------------------------------------------------------ The Code Cage Team's Profile: http://www.thecodecage.com/forumz/member.php?userid=2 View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=30124 |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Rick, that wasn't aimed at you :) I think the OP may be using something like: Sheets("Holidays").Activecell.Value Which of course serves no purpose or maybe the OP is forcing the select hoping it may follow a hyperlink there....shots in the dark i know, and yes it was an odd request. -- The Code Cage Team Regards, The Code Cage Team http://www.thecodecage.com ------------------------------------------------------------------------ The Code Cage Team's Profile: http://www.thecodecage.com/forumz/member.php?userid=2 View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=30124 |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Could be the OP was trying to do the select in one line without first
activating the sheet and kept getting an error message. Probably just wanted to know how to get it to select A1 from another sheet. "The Code Cage Team" wrote: Rick, that wasn't aimed at you :) I think the OP may be using something like: Sheets("Holidays").Activecell.Value Which of course serves no purpose or maybe the OP is forcing the select hoping it may follow a hyperlink there....shots in the dark i know, and yes it was an odd request. -- The Code Cage Team Regards, The Code Cage Team http://www.thecodecage.com ------------------------------------------------------------------------ The Code Cage Team's Profile: http://www.thecodecage.com/forumz/member.php?userid=2 View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=30124 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Select text before carriage return | Excel Discussion (Misc queries) | |||
VBA: Column Select then Data Select then return to cell A1 | Excel Discussion (Misc queries) | |||
Macro to Return Row, then move over and select up to | Excel Discussion (Misc queries) | |||
Select sheet, Pause till Enter pressed, return to previous sheet | Excel Programming | |||
Select Minimum value and return the name of the supplier | Excel Worksheet Functions |