Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Macro using Save As Problem


I recorded a macro that will save the file under another name, then
close it. It works great, but only on my computer.

The problem is that when you're using the file on another computer, the
macro won't work because the user has a different login name. The Save
destination includes my username, which is obviously different on
another computer. Is there a way around this?

Thanks!


--
mbmadiw
------------------------------------------------------------------------
mbmadiw's Profile: http://www.excelforum.com/member.php...o&userid=36153
View this thread: http://www.excelforum.com/showthread...hreadid=559288

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Macro using Save As Problem

I think I would ask the user where they wanted to save the file--using
application.getsaveasfilename.

If you're trying to save to "my documents" or the user's desktop, maybe this'll
give you an alternative:

Option Explicit
Sub testme()
Dim myDocumentsPath As String
Dim myDeskTopPath As String
Dim WSHShell As Object

Set WSHShell = CreateObject("WScript.Shell")
myDocumentsPath = WSHShell.SpecialFolders.Item("mydocuments")
myDeskTopPath = WSHShell.SpecialFolders.item("Desktop")

MsgBox myDocumentsPath & vbLf & myDeskTopPath

End Sub



mbmadiw wrote:

I recorded a macro that will save the file under another name, then
close it. It works great, but only on my computer.

The problem is that when you're using the file on another computer, the
macro won't work because the user has a different login name. The Save
destination includes my username, which is obviously different on
another computer. Is there a way around this?

Thanks!

--
mbmadiw
------------------------------------------------------------------------
mbmadiw's Profile: http://www.excelforum.com/member.php...o&userid=36153
View this thread: http://www.excelforum.com/showthread...hreadid=559288


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Macro using Save As Problem


Thanks! I'll give 'er a try.


--
mbmadiw
------------------------------------------------------------------------
mbmadiw's Profile: http://www.excelforum.com/member.php...o&userid=36153
View this thread: http://www.excelforum.com/showthread...hreadid=559288

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
Macro to Save without the Save Message Ellen G Excel Discussion (Misc queries) 4 February 23rd 07 08:52 PM
Save as problem with Save In drop down box Doug Excel Discussion (Misc queries) 3 March 16th 06 02:46 PM
PDF Save As problem lance99 Excel Programming 1 October 29th 04 05:39 AM
Excel Macro - Save Function Problem Nasdax Excel Programming 1 July 13th 04 07:07 PM
Prompted to save changes after macro save - why? Izar Arcturus Excel Programming 2 December 10th 03 09:27 PM


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