Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 270
Default Save As and Save Not

Hi Bob

When I insert the two lines you suggest I get an error message 'Invalid
Qualifier' with the inputText in the SaveCopyAs line highlighted.

I tried deleting the '.Text' at the end of the line and it saved as - but
not as an excel file.

Any ideas?

Sandy

"Bob Phillips" wrote in message
...
Sub New_Name()
Application.EnableEvents = False
Application.Run "Open_All_Sheets"

Dim inputText As String
inputText = Application.InputBox("Enter name here", _
"Persons Name", , , , , 2)

Sheets("Data Input").Range("D1:H1").Value = inputText

Worksheets("Data Input").Buttons("Name_Button").Visible = False
'Worksheets("Data Input").Buttons("Name_Button").Visible = True

Application.Run "Lock_All_Sheets"

ThisWorkbook.SaveCopyAs "Personal Data-" & inputText.Text
ThisWorkbook.Close SaveChanges:=False
Application.EnableEvents = True

End Sub


--
HTH

Bob

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

"Sandy" wrote in message
...
Hi

I have a macro as follows:-

(The Workbook name is - "Personal Data")

Sub New_Name()
Application.EnableEvents = False
Application.Run "Open_All_Sheets"

Dim inputText As String
inputText = Application.InputBox("Enter name here", _
"Persons Name", , , , , 2)

Sheets("Data Input").Range("D1:H1").Value = inputText

Worksheets("Data Input").Buttons("Name_Button").Visible = False
'Worksheets("Data Input").Buttons("Name_Button").Visible = True

Application.Run "Lock_All_Sheets"
Application.EnableEvents = True

End Sub

What I would like to do is - as part of this macro - have the workbook
saved as
"Personal Data-inputText", where 'inputText' is from the InputBox. Then
have the original file close without saving.

I know I am well out of my depth on this one so your help would be
gratefully appreciated.

Sandy





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
Save As and save current numbers not the actual formulas and links Frank Menard Excel Discussion (Misc queries) 2 November 9th 06 09:18 PM
Command Button Save As Application.ExecuteExcel4Macro ("SAVE.AS?() Paul Dennis Excel Discussion (Misc queries) 5 September 18th 06 05:34 PM
how to get disk icon on save button of save as dialog like 2000 RichT Excel Discussion (Misc queries) 2 March 9th 06 08:13 PM
when i save xls file, debug script is running and canno't save fil Imtiaz Excel Discussion (Misc queries) 1 July 16th 05 03:47 PM
Save Excel file - prompts to save - no Volitile functions used POWER CERTS Excel Worksheet Functions 2 November 1st 04 09:27 PM


All times are GMT +1. The time now is 08:58 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"