View Single Post
  #4   Report Post  
Hank Scorpio
 
Posts: n/a
Default

On Sat, 8 Jan 2005 15:19:07 -0000, "Bob Phillips"
wrote:

Why pass the sheet name, why not the sheet object?


Because that's not what the OP asked for. In the absence of him/her
stating what s/he was planning to do with the sheet name, I prefer not
to make assumptions.

Sub CallingProcedure()

'If you know the name of the sheet
CalledProcedure Worksheets("Sheet2")

'Or if you just want the action on the current sheet
CalledProcedure ActiveSheet

End Sub



Sub CalledProcedure(SheetToActOn As Worksheet)

'Put the time into cell A1
SheetToActOn.Range("A1") = Now()

End Sub



---------------------------------------------------------
Hank Scorpio
scorpionet who hates spam is at iprimus.com.au (You know what to do.)
* Please keep all replies in this Newsgroup. Thanks! *