open every Workbook in a specific cell

Roman_k

New Member
Joined
Jan 14, 2020
Messages
16
Office Version
  1. 365
Platform
  1. Windows
Hi All,
I am trying to find a way to open every new workbook at cell A4, I have found the code below but It only works for the saved workbook it is in, any Ideas


Private Sub Workbook_SheetActivate(ByVal Wsh As Object)
On Error Resume Next
Wsh.Range("A4").Select
End Sub

Thanks in advance for any help
Roman
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
Your script says when sheet is activated.
But you said
find a way to open every new workbook
A Workbook and a sheet are not the same. And what do you mean when you say New.
 
Upvote 0
Hi,
Sorry not very good at VBA, I would like every new workbook that gets opened to open with cell A4 selected, I've had a look around but can't seem to find anything that fits my need.
 
Upvote 0
I do not know how this could be done. Because when a New Workbook is created it has no Vba code.
And I do not know how a script could be put into the Personal Workbook that would do that
 
Upvote 0
Place the code in an addin after hooking the application events ...Alternatively, you can save the workbook as a macro enabled template.
 
Upvote 0

Forum statistics

Threads
1,214,636
Messages
6,120,669
Members
448,977
Latest member
moonlight6

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top