ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Auto Open help (https://www.excelbanter.com/excel-programming/343543-auto-open-help.html)

Gordon[_2_]

Auto Open help
 
Hi...

I'm opening a template. The new sheet requires the user to input a name
9using an input box) that the new spreadsheet will be called. This must
happen so that if the sheet is used several times, the user will not have to
enter this information again (it must only be the one time, when it spins
away from the template). The sheet auto saves on closure. I can't get my mind
around it. Any help gratefully received.


Dave Peterson

Auto Open help
 
Maybe just checking to see if that cell is empty would be sufficient:

Option Explicit
sub auto_open()
dim myCell as range
set mycell = thisworkbook.worksheets("Sheet1").range("a1")
if isempty(mycell) then
mycell.value = inputbox(Prompt:="Your name is...")
end if
end sub




Gordon wrote:

Hi...

I'm opening a template. The new sheet requires the user to input a name
9using an input box) that the new spreadsheet will be called. This must
happen so that if the sheet is used several times, the user will not have to
enter this information again (it must only be the one time, when it spins
away from the template). The sheet auto saves on closure. I can't get my mind
around it. Any help gratefully received.


--

Dave Peterson


All times are GMT +1. The time now is 12:31 PM.

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