Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 105
Default SIMPLE msgbox Problem

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\)




  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 105
Default SIMPLE msgbox Problem

On May 28, 4:34*pm, James8309 wrote:
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\)




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

thanks alot everyone
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default SIMPLE msgbox Problem

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

--


Gary


"James8309" wrote in message
...
On May 28, 4:34 pm, James8309 wrote:
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\)




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

thanks alot everyone


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default SIMPLE msgbox Problem

Reply in other thread not good enough for you?

--
---
HTH

Bob


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



"James8309" wrote in message
...
On May 28, 4:34 pm, James8309 wrote:
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\)




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

thanks alot everyone


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
A simple inputbox & responding msgbox coding FARAZ QURESHI Excel Discussion (Misc queries) 4 May 5th 09 06:39 AM
Very EASY & SIMPLE VBA~!!! HELP msgbox James8309 Excel Programming 1 May 28th 08 07:32 AM
popup msgbox ok continue simple code anduare2 Excel Programming 2 April 16th 08 03:42 PM
Simple MsgBox question Gig[_2_] Excel Programming 2 July 15th 06 03:55 PM
Simple Msgbox needed johncassell[_40_] Excel Programming 2 February 24th 06 05:57 PM


All times are GMT +1. The time now is 09:48 AM.

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

About Us

"It's about Microsoft Excel"