Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 469
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,298
Default 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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 469
Default 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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cell("filename") doesn't update to new filename when do save as. Louis Excel Worksheet Functions 2 March 22nd 07 07:27 PM
set filename to <filename-date on open bob engler Excel Worksheet Functions 2 July 13th 06 05:11 AM
Import Data with the filename coming from inputbox ? Iceage Excel Programming 1 November 24th 04 03:22 AM
Inputbox and Application.InputBox Maria[_7_] Excel Programming 1 September 20th 04 11:36 AM
Saving filename same as import filename Matt Excel Programming 4 February 24th 04 03:01 PM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"