If the Workbook_Open sub is in the Workbook module, it'll automatically run on opening. May I suggest a tweak to your code tho:
Private Sub Workbook_Open
Sheets("Sheetname".select
With activesheet
.range("A1".copy destination:=Activesheet.range("A4"
end with
end sub
I would say that in 99% of cases, this method of copy and pasting saves time over selecting the cell, copying to clipboard, selecting the paste cell then pasting
If your sub isn't running on open, I think you probably have the code in the wrong place:
1: Go to VB Editor
2: Double CLick on "This Workbook" in the VBA Project window
3: Select Workbook from the 1st dropdown
4: Select Open from the 2nd dropdown
5: The structure (Start sub / end sub) will automatically be put in place for you. Now all you need do is write the code ;-)
HTH
~Geoff~
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.