Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 270
Default Save as troubles

Hi

The following fails at the line indicated between asterisks - can anyone
tell me why and offer a solution

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.xls
**********

ThisWorkbook.Close SaveChanges:=False

Application.EnableEvents = True

End Sub


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Save as troubles

Hi Sandy,

Try:

ThisWorkbook.SaveCopyAs Filename:="Personal Data-" _
& inputText & ".xls"


---
Regards,
Norman


"Sandy" wrote in message
...
Hi

The following fails at the line indicated between asterisks - can anyone
tell me why and offer a solution

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.xls
**********

ThisWorkbook.Close SaveChanges:=False

Application.EnableEvents = True

End Sub




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default Save as troubles

Shouldn't it be:

ThisWorkbook.SaveCopyAs "Personal Data-" & inputText & ".xls"

RBS

"Sandy" wrote in message
...
Hi

The following fails at the line indicated between asterisks - can anyone
tell me why and offer a solution

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.xls
**********

ThisWorkbook.Close SaveChanges:=False

Application.EnableEvents = True

End Sub



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 270
Default Save as troubles

Works a treat Norman thank you
Sandy

"Norman Jones" wrote in message
...
Hi Sandy,

Try:

ThisWorkbook.SaveCopyAs Filename:="Personal Data-" _
& inputText & ".xls"


---
Regards,
Norman


"Sandy" wrote in message
...
Hi

The following fails at the line indicated between asterisks - can anyone
tell me why and offer a solution

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.xls
**********

ThisWorkbook.Close SaveChanges:=False

Application.EnableEvents = True

End Sub






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
Troubles Jonas Krogh Excel Discussion (Misc queries) 1 October 22nd 09 11:14 AM
COM Add-in Troubles Howard Excel Discussion (Misc queries) 0 May 22nd 07 01:59 PM
Chart troubles [email protected] Excel Worksheet Functions 2 May 12th 07 02:36 PM
IF troubles JG Excel Worksheet Functions 6 December 24th 06 04:58 AM
troubles with ActiveWorkbook.Save Gabriele C[_4_] Excel Programming 1 August 11th 04 05:35 PM


All times are GMT +1. The time now is 02:52 PM.

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"