Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / May 2008

Tip: Looking for answers? Try searching our database.

SIMPLE msgbox Problem

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
James8309 - 28 May 2008 07:34 GMT
Hi everyone,

How do I program it in VBA in a way that;

1. Msgbox popping up for an input

2. Typing file name into msgbox

3. It saves it into hard drive (i.e. c:\Mydocument\)
James8309 - 28 May 2008 08:19 GMT
> Hi everyone,
>
[quoted text clipped - 5 lines]
>
> 3. It saves it into hard drive (i.e. c:\Mydocument\)

Also How do I make the current workbook close without asking me "DO
YOU WANT TO SAVE" lol

thanks alot everyone
Gary Keramidas - 28 May 2008 08:35 GMT
this is just a simple bit of code, doesn't do any error checking because i don't
know what you're dealing with.

Sub save_it()
     Dim FileToSave As String
     Dim fPath As String
     fPath = "C:\My Documents\"
     FileToSave = Application.InputBox("Enter filename to save", "Save File", ,
, , , , 2)
     Application.DisplayAlerts = False
     ActiveWorkbook.SaveAs (fPath & FileToSave & ".xls")
     Application.DisplayAlerts = True
End Sub

Signature

Gary

> Hi everyone,
>
[quoted text clipped - 5 lines]
>
> 3. It saves it into hard drive (i.e. c:\Mydocument\)

Also How do I make the current workbook close without asking me "DO
YOU WANT TO SAVE" lol

thanks alot everyone
Bob Phillips - 28 May 2008 10:34 GMT
Reply in other thread not good enough for you?

Signature

---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

> Hi everyone,
>
[quoted text clipped - 5 lines]
>
> 3. It saves it into hard drive (i.e. c:\Mydocument\)

Also How do I make the current workbook close without asking me "DO
YOU WANT TO SAVE" lol

thanks alot everyone
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.