Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I want to activate the worksheet that was active before I added a new
sheet to the workbook in VBA for excel. Can anyone help me on how to do that? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
dim mySelection as range
set myselection = selection 'add your worksheet application.goto myselection wrote: I want to activate the worksheet that was active before I added a new sheet to the workbook in VBA for excel. Can anyone help me on how to do that? -- Dave Peterson |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Not sure if this post worked so apologies if this is a duplicate:
Option Explicit Sub () Dim CurrentSheet, NewSheet As Worksheet Set CurrentSheet = ActiveSheet Set NewSheet = Worksheets.Add CurrentSheet.Activate End Sub |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I think this should work:
Option Explicit Sub () Dim CurrentSheet, NewSheet As Worksheet Set CurrentSheet = ActiveSheet Set NewSheet = Worksheets.Add CurrentSheet.Activate End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
reference cell from previous worksheet without "naming" worksheet | Excel Worksheet Functions | |||
Activate Worksheet | Excel Programming | |||
Worksheet.activate | Excel Discussion (Misc queries) | |||
Return to previous worksheet after code pastes in another worksheet? | Excel Programming | |||
Worksheet activate | Excel Programming |