Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am new to macros and visual basic. I am trying to get what is found below
to run on all worksheets not just the active sheet which is happening now. Thank you. (Sorry for the double post in Excel Worksheet Functions) Sub stock1() ' ' stock1 Macro ' ' Keyboard Shortcut: Ctrl+y ' Dim ws As Worksheet For Each ws In ActiveWorkbook.Worksheets ActiveWorkbook.RefreshAll Next For Each ws In ActiveWorkbook.Worksheets Cells.Find(What:="put options", After:=ActiveCell, LookIn:=xlFormulas, _ LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _ MatchCase:=False, SearchFormat:=False).Activate ActiveCell.Range("A1:P317").Select Selection.Cut ActiveCell.Offset(-14, 12).Range("A1").Select Cells.Find(What:="call options", After:=ActiveCell, LookIn:=xlFormulas, _ LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _ MatchCase:=False, SearchFormat:=False).Activate ActiveCell.Offset(0, 17).Range("A1").Select ActiveSheet.Paste Next End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
macro to find cell content in sheets and make sheet active | Excel Discussion (Misc queries) | |||
Run macro when Sheets are active | Excel Discussion (Misc queries) | |||
Make global Macro/Add-in for all active Workbooks/Sheets | Excel Programming | |||
ow can I get the active sheet name to a var in a macro?? | Excel Programming | |||
Copy from active sheet and paste into new sheet using info from cell in active | Excel Programming |