open every Workbook in a specific cell

Roman_k

New Member
Joined
Jan 14, 2020
Messages
15
Office Version
365
Platform
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
 

Some videos you may like

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).

My Aswer Is This

Well-known Member
Joined
Jul 5, 2014
Messages
16,718
Office Version
2013
Platform
Windows
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.
 

Roman_k

New Member
Joined
Jan 14, 2020
Messages
15
Office Version
365
Platform
Windows
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.
 

My Aswer Is This

Well-known Member
Joined
Jul 5, 2014
Messages
16,718
Office Version
2013
Platform
Windows
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
 

Jaafar Tribak

Well-known Member
Joined
Dec 5, 2002
Messages
7,580
Office Version
2016
Platform
Windows
Place the code in an addin after hooking the application events ...Alternatively, you can save the workbook as a macro enabled template.
 

Forum statistics

Threads
1,089,217
Messages
5,406,916
Members
403,111
Latest member
Donbozone

This Week's Hot Topics

Top