Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 246
Default Set mySavedSummary = ActiveWorkbook.SaveAs( .......

What am I doing wrong:

Dim mySavedSummary As Object
Set mySavedSummary = ActiveWorkbook.SaveAs(Filename:="R:\Statistics
\Example.xls")

....and how do I alter the above so that it does work?

Any help greatly appreciated,
J.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 131
Default Set mySavedSummary = ActiveWorkbook.SaveAs( .......

Dim mySavedSummary As Object
ActiveWorkbook.SaveAs Filename:="R:\Statistics\Example.xls"
Set mySavedSummary = GetObject("R:\Statistics\Example.xls")


--
urkec


"WhytheQ" wrote:

What am I doing wrong:

Dim mySavedSummary As Object
Set mySavedSummary = ActiveWorkbook.SaveAs(Filename:="R:\Statistics
\Example.xls")

....and how do I alter the above so that it does work?

Any help greatly appreciated,
J.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Set mySavedSummary = ActiveWorkbook.SaveAs( .......

You do not need to do anything, because a .SaveAs does not change the WB:

Private Sub CommandButton1_Click()
Dim WB As Workbook

Set WB = ActiveWorkbook

ActiveWorkbook.SaveAs "C:\New name.xls"
Debug.Print WB.FullName

End Sub

If you check .SaveAs in the Object Browser, you will see it is a Sub that
has no return value. Therefore, you cannot "Set" anything to it

NickHK

"WhytheQ" wrote in message
oups.com...
What am I doing wrong:

Dim mySavedSummary As Object
Set mySavedSummary = ActiveWorkbook.SaveAs(Filename:="R:\Statistics
\Example.xls")

...and how do I alter the above so that it does work?

Any help greatly appreciated,
J.



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
ActiveWorkbook.SaveAs problem SandyUK[_11_] Excel Programming 2 November 14th 05 02:54 PM
Max charactors for 'ActiveWorkbook.SaveAs Filename'? TOMB Excel Worksheet Functions 1 February 16th 05 06:44 AM
'ActiveWorkbook.SaveAs Filename' TOMB Excel Programming 2 February 15th 05 11:51 PM
ActiveWorkbook.SaveAs Problem SowBelly Excel Programming 4 August 4th 04 10:58 PM
activeworkbook.saveas J Silver Excel Programming 0 June 25th 04 09:01 PM


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