![]() |
inputbox info = filename
First program I have ever wrote am 68 and having fun.
trying to have user input into inputbox then use that as filename to save acopy as want to save a copy as need to keep active sheet for more use values remain. Is info available to understand if & end if where to put and relationship to code. Got all formulas and update working fine. Saving is giving me fitsss. Seems nothing I try works Any help greatly taken Thanks Curt |
inputbox info = filename
go to the IDE (ALT+F11) add a standard code module and paste this:
Option Explicit Sub Save_A_Copy() Dim fn As String fn = Application.GetSaveAsFilename() If UCase(fn) = "FALSE" Then Exit Sub ActiveWorkbook.SaveCopyAs fn End Sub step through the code using the F8 key, and you'll see pretty easily what it does. Read HELP on the two key methods, called GetSaveAsFilename and SaveCopyAs since help is pretty good on these. "Curt" wrote: First program I have ever wrote am 68 and having fun. trying to have user input into inputbox then use that as filename to save acopy as want to save a copy as need to keep active sheet for more use values remain. Is info available to understand if & end if where to put and relationship to code. Got all formulas and update working fine. Saving is giving me fitsss. Seems nothing I try works Any help greatly taken Thanks Curt |
inputbox info = filename
Thanks the explain of f8 key use sure helped a lot got it all working
now.After trying for some time off & on it sure is nice seeing it all work. Is there somewhere i can look to find ways to improve speed of code. When updateing it takes time but it works. for some reason one part would not function useing with & end with. Had to go to select. ANYWAY I sure thank you for f8 etc Thanks Again Curt "Patrick Molloy" wrote: go to the IDE (ALT+F11) add a standard code module and paste this: Option Explicit Sub Save_A_Copy() Dim fn As String fn = Application.GetSaveAsFilename() If UCase(fn) = "FALSE" Then Exit Sub ActiveWorkbook.SaveCopyAs fn End Sub step through the code using the F8 key, and you'll see pretty easily what it does. Read HELP on the two key methods, called GetSaveAsFilename and SaveCopyAs since help is pretty good on these. "Curt" wrote: First program I have ever wrote am 68 and having fun. trying to have user input into inputbox then use that as filename to save acopy as want to save a copy as need to keep active sheet for more use values remain. Is info available to understand if & end if where to put and relationship to code. Got all formulas and update working fine. Saving is giving me fitsss. Seems nothing I try works Any help greatly taken Thanks Curt |
All times are GMT +1. The time now is 08:30 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com