View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
Tim Williams Tim Williams is offline
external usenet poster
 
Posts: 1,588
Default Programming Macro - Sheet Specific

with thisworkbook.sheets("Sheet 3")
.range("K3").value = 1
.range("G3").value = .range("F3").value
.calculate
end with


Tim


<Cam Pearce wrote in message ...
I have a macro that does some minor processing to sheet3 of my workbook. I
want to run the macro from a button on sheet1 of my workbook. When I do run
the macro (from sheet1) the processing occurs in cells in sheet1, not in
sheet 3. I tried the worksheet("sheet3").active code but it jumped to
sheet3 when run (which I do not want). I want to run the macro from sheet1
and stay on sheet1, even thought sheet3 will have some changes made by the
macro. Is this possible?

Sub Start()
'
' Play Macro
' Macro recorded 11/07/2008 by Cameron
'
' Keyboard Shortcut: Ctrl+a
'

Range("K3").Value = 0
Range("F3").Select
Selection.Copy
Range("G3").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Range("K3").Value = Range("K3").Value + 1
Calculate


End Sub