Tried the below code to insert the environ username in W1 of Sheet1 when the workbook is opened but it's not working and I can't work out why.
Anyone got any ideas why it'snot working?
Please Login or Register to view this content.
Tried the below code to insert the environ username in W1 of Sheet1 when the workbook is opened but it's not working and I can't work out why.
Anyone got any ideas why it'snot working?
Please Login or Register to view this content.
Is it working..
don't forget to save and re-open.. with "Enable Macro"Please Login or Register to view this content.
EDIT: In your code... its looks fine for me.
try to select a different sheet.. and come back to the 1st sheet.. hope will work..
Regards!
=DEC2HEX(3563)
If you like someone's answer, click the star to give them a reputation point for that answer...
I've saved, closed and re-opened and it hasn't worked. Not sure what you've posted
See attached book
Yes you're right.
I deleted the (ByVal target As Range) and it works when you change sheets and return.
I need this to work when the book is opened not when activated as there will only be one sheet when this is finished
Still not working when I open it, tried changing to Sub Workbook_Open () but that isn't working either.
Not sure how this should be done from open rather than when sheet activated
I had it in the wrong module, I had the code in Sheet1 instead of ThisWorkbook
FYI, working code if anyone is interested.
Please Login or Register to view this content.
Thanks for feedback.. and updated code..
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks