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
 

Some videos you may like

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.

My Aswer Is This

Well-known Member
Joined
Jul 5, 2014
Messages
17,443
Office Version
  1. 2013
Platform
  1. 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
16
Office Version
  1. 365
Platform
  1. 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
17,443
Office Version
  1. 2013
Platform
  1. 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
8,185
Office Version
  1. 2016
Platform
  1. Windows
Place the code in an addin after hooking the application events ...Alternatively, you can save the workbook as a macro enabled template.
 

Watch MrExcel Video

Forum statistics

Threads
1,127,735
Messages
5,626,583
Members
416,192
Latest member
steinach

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
Top