Macro Auto_open won't run if excel opened from another macro. Please help.

sammpa

New Member
Joined
Jun 18, 2018
Messages
1
Hi there.

I have an Excel "Blank Rate request Form" that enters today's date in one cell and the identified user in another cell.

It is housed on a shared drive (R:) for others to use. If anyone opens that folder and opens the Excel the above macro works fine.

Sub Auto_open()

Range("username") = Environ("username")
ActiveSheet.Unprotect
Range("DATEINPUT").Value = Date
Range("AHCMINPUT").Select
ActiveSheet.Protect

End Sub

However, if the file is opened from a button on another workbook, the auto_open doesn't run.

I have popped a "RESET FORM" button on the "Route Request" form which runs the same code for now.

My question, if you haven't gathered, is how can I make that code run or force the auto_open to work if opening the sheet from a macro button on another workbook?

This is the code that opens the sheet:

Sub ZBU_Route_Request
'
' ZBU_Route_Request Macro
'

'
Workbooks.Open Filename:-="R:\GB Routes\Blank Rate request Form.xlsm", _
UpdateLinks:=0

End Sub

Any help would be appreciated.

Many thanks
 

Some videos you may like

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.

Watch MrExcel Video

Forum statistics

Threads
1,108,992
Messages
5,526,109
Members
409,685
Latest member
Bellybb

This Week's Hot Topics

Top