Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Select sheet
Hi,
I am selecting varous sheets thru a userform combobox based combobox value. How can I store the sheet name before loading the userform and return to that sheet when I close the user form with a close button? Thanks in advance Abdul |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Select sheet
Abdul,
Try something like Sub SaveLocation(Optional GoBack As Variant = False) Static TopLeftCell As Range Static SelectedCells As Range If GoBack = False Then Set TopLeftCell = ActiveWindow.VisibleRange(1, 1) Set SelectedCells = Selection Else Application.Goto TopLeftCell SelectedCells.Select End If End Sub To save the current location, use SaveLocation Then, to return to the location, use SaveLocation GoBack:=True -- Cordially, Chip Pearson Microsoft MVP - Excel www.cpearson.com "Abdul" wrote in message ... Hi, I am selecting varous sheets thru a userform combobox based combobox value. How can I store the sheet name before loading the userform and return to that sheet when I close the user form with a close button? Thanks in advance Abdul |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Select pictures from a sheet into an other sheet | Excel Discussion (Misc queries) | |||
Alternate Row Select in Sheet 1 then Paste to Sheet 2 | Excel Worksheet Functions | |||
How do I select price from sheet.b where sheet.a part no = sheet.b | Excel Worksheet Functions | |||
Use Sheet CodeNames to Select Sheet in Different Workbook | Excel Discussion (Misc queries) | |||
Macro, select Sheet "Number", NOT Sheet Name | Excel Worksheet Functions |