Dynamic macro

  • Thread starter Thread starter PCOR
  • Start date Start date
P

PCOR

I dont know is this is possible...but if it is I am suee one of the wizzards
will tell me how to do this
Say you wanted to copy a range from one sheet to another sheet where the
range changes daily.
Could you have the macro request the range required - type in the required
info- and then execute the copy function for that range.
Thanks a lot
 
You can use something like this

Sub test()
Dim mycell As Range
Set mycell = Application.InputBox( _
prompt:="Select a range", Type:=8)
mycell.Copy Sheets("Sheet2").Range("A1")
End Sub
 
Works VERY well
Many thanks
Ron de Bruin said:
You can use something like this

Sub test()
Dim mycell As Range
Set mycell = Application.InputBox( _
prompt:="Select a range", Type:=8)
mycell.Copy Sheets("Sheet2").Range("A1")
End Sub
 
Back
Top