ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Edit Event from Macro (https://www.excelbanter.com/excel-programming/366781-edit-event-macro.html)

Kervin Manasseh[_2_]

Edit Event from Macro
 
Currently have a simple open event, which auto populates some date ranges:

Sub Workbook_Open()
Range("E9").Value = (Date - 90)
Range("I9").Value = (Date + 14)
End Sub

Would like to give the user an opportunity to change the default values of
90 and 14; and save the update values. Preventing them from having to adjust
these everytime.

I intend to activate the macro by the use of a button. I just can't figure
out how to the the values from the input box into the workbook_open procedure.

Any help would be appreciated, and while I am at it, thanks to all who
participate in this forum. I have learned quite a bit from browsing thru
some of these threads.

Bob Phillips

Edit Event from Macro
 
Why not get them to save those values directly to cells and then use

Sub Workbook_Open()
Range("E9").Value = Date - Range("M1").Value
Range("I9").Value = Date + Range("M2").Value
End Sub

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Kervin Manasseh" wrote in
message ...
Currently have a simple open event, which auto populates some date ranges:

Sub Workbook_Open()
Range("E9").Value = (Date - 90)
Range("I9").Value = (Date + 14)
End Sub

Would like to give the user an opportunity to change the default values of
90 and 14; and save the update values. Preventing them from having to

adjust
these everytime.

I intend to activate the macro by the use of a button. I just can't

figure
out how to the the values from the input box into the workbook_open

procedure.

Any help would be appreciated, and while I am at it, thanks to all who
participate in this forum. I have learned quite a bit from browsing thru
some of these threads.





All times are GMT +1. The time now is 11:39 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com