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
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