PC Review


Reply
Thread Tools Rate Thread

Automatic Open Created Spreadsheet

 
 
Joe K.
Guest
Posts: n/a
 
      27th Nov 2007

Please help me create a script to save and close my current spreadsheet and
open
the new spreadsheet (MATERIAL_SHIIPPING_ORDERS).

Listed below is the script to create the new spreadsheet.

Thank so much for the help.

With ActiveSheet
.Parent.SaveAs Filename:=ActWkbk.Path & "\" &
"MATERIAL_SHIIPPING_ORDERS_.xls"
End With
 
Reply With Quote
 
 
 
 
Joel
Guest
Posts: n/a
 
      27th Nov 2007
What you are asking for cannot be accomplished. The macro that runs the code
is in the activeworkbook will stop running if you close the workbook.

You may need to do 1 of 3 tings
1) Don't close the active wrokbook
2) Use a 3rd workbook with a macro that runs you r code
3) Put the macro in a Personal.xls file.

"Joe K." wrote:

>
> Please help me create a script to save and close my current spreadsheet and
> open
> the new spreadsheet (MATERIAL_SHIIPPING_ORDERS).
>
> Listed below is the script to create the new spreadsheet.
>
> Thank so much for the help.
>
> With ActiveSheet
> .Parent.SaveAs Filename:=ActWkbk.Path & "\" &
> "MATERIAL_SHIIPPING_ORDERS_.xls"
> End With

 
Reply With Quote
 
Don Guillett
Guest
Posts: n/a
 
      27th Nov 2007
Sub saveitas()
ActiveWorkbook.saveas Filename:="don"
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software
(E-Mail Removed)
"Joe K." <Joe K.@discussions.microsoft.com> wrote in message
news:8AA33B98-3A06-44B1-9E78-(E-Mail Removed)...
>
> Please help me create a script to save and close my current spreadsheet
> and
> open
> the new spreadsheet (MATERIAL_SHIIPPING_ORDERS).
>
> Listed below is the script to create the new spreadsheet.
>
> Thank so much for the help.
>
> With ActiveSheet
> .Parent.SaveAs Filename:=ActWkbk.Path & "\" &
> "MATERIAL_SHIIPPING_ORDERS_.xls"
> End With


 
Reply With Quote
 
Joe K.
Guest
Posts: n/a
 
      27th Nov 2007

Please help me create a script to open the new spreadsheet
(MATERIAL_SHIIPPING_ORDERS), save and close my current spreadsheet.

Listed below is the script to create the new spreadsheet.

Thank so much for the help.

With ActiveSheet
.Parent.SaveAs Filename:=ActWkbk.Path & "\" &
"MATERIAL_SHIIPPING_ORDERS_.xls"
End With


"Joel" wrote:

> What you are asking for cannot be accomplished. The macro that runs the code
> is in the activeworkbook will stop running if you close the workbook.
>
> You may need to do 1 of 3 tings
> 1) Don't close the active wrokbook
> 2) Use a 3rd workbook with a macro that runs you r code
> 3) Put the macro in a Personal.xls file.
>
> "Joe K." wrote:
>
> >
> > Please help me create a script to save and close my current spreadsheet and
> > open
> > the new spreadsheet (MATERIAL_SHIIPPING_ORDERS).
> >
> > Listed below is the script to create the new spreadsheet.
> >
> > Thank so much for the help.
> >
> > With ActiveSheet
> > .Parent.SaveAs Filename:=ActWkbk.Path & "\" &
> > "MATERIAL_SHIIPPING_ORDERS_.xls"
> > End With

 
Reply With Quote
 
Don Guillett
Guest
Posts: n/a
 
      27th Nov 2007
Sub saveas()
old = ActiveWorkbook.Name
'MsgBox old
ActiveWorkbook.Save
ActiveWorkbook.saveas Filename:="don"
For Each w In Application.Workbooks
If w.Name = old Then
w.Close
Exit Sub
End If
Next
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software
(E-Mail Removed)
"Joe K." <Joe K.@discussions.microsoft.com> wrote in message
news:3D4B1696-3DF0-4F8F-A70A-(E-Mail Removed)...
>
> Please help me create a script to open the new spreadsheet
> (MATERIAL_SHIIPPING_ORDERS), save and close my current spreadsheet.
>
> Listed below is the script to create the new spreadsheet.
>
> Thank so much for the help.
>
> With ActiveSheet
> .Parent.SaveAs Filename:=ActWkbk.Path & "\" &
> "MATERIAL_SHIIPPING_ORDERS_.xls"
> End With
>
>
> "Joel" wrote:
>
>> What you are asking for cannot be accomplished. The macro that runs the
>> code
>> is in the activeworkbook will stop running if you close the workbook.
>>
>> You may need to do 1 of 3 tings
>> 1) Don't close the active wrokbook
>> 2) Use a 3rd workbook with a macro that runs you r code
>> 3) Put the macro in a Personal.xls file.
>>
>> "Joe K." wrote:
>>
>> >
>> > Please help me create a script to save and close my current spreadsheet
>> > and
>> > open
>> > the new spreadsheet (MATERIAL_SHIIPPING_ORDERS).
>> >
>> > Listed below is the script to create the new spreadsheet.
>> >
>> > Thank so much for the help.
>> >
>> > With ActiveSheet
>> > .Parent.SaveAs Filename:=ActWkbk.Path & "\" &
>> > "MATERIAL_SHIIPPING_ORDERS_.xls"
>> > End With


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I tell how many pages I have created in my spreadsheet jsnatas Microsoft Excel Worksheet Functions 11 28th Oct 2008 05:34 PM
Trial Has Expired and I can't open spreadsheet created in trial - =?Utf-8?B?bWxzMjEyNQ==?= Microsoft Excel Worksheet Functions 5 11th Jul 2007 01:24 PM
I can't open a created spreadsheet. Why ? =?Utf-8?B?TmFuY2lhbm5l?= Microsoft Excel Misc 3 3rd Mar 2007 05:39 PM
Cannot Open Spreadsheet Created in Excel 2002 SP-2 Mike Microsoft Excel Discussion 3 8th Apr 2004 12:35 PM
Spreadsheet won't open with automatic calculation Stefan du Plooy Microsoft Excel Crashes 0 4th Nov 2003 11:49 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:00 PM.