Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 94
Default Question for Dave Peterson

Hi Dave,

Earlier this week, you responded to a question I had and Im wondering if
you can help me once again.

Since I havent picked up on this project again until now, I didnt realize
I made a mistake and the solution you provided me with didnt quite work like
I thought. I had requested a way to automatically save a copy of the current
users workbook page to the desktop without the code being specific (this
will be accessed by multiple users). When I replace SpecialFolders (10) with
SpecialFolders (Desktop), the file still saves in the same place
C:\Documents and Settings\Jenny and its title is now Desktop and the range
value (not quite correct).

I know Im just missing just one step to have it placed directly in the
Desktop Folder (so it will appear on my desktop), but Im not sure how to
accomplish it.

Thank you for your thoughts in advance Jenny B.

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Question for Dave Peterson

Just a guess.

I'm betting that you're missing a backslash in your code.

Option Explicit
Sub DesktopSave()

Dim myPath As String
Dim nRng As Range
Dim fName As String

Set nRng = ActiveSheet.Range("H5")

ActiveSheet.Copy

myPath = CreateObject("WScript.Shell").SpecialFolders(10)

fName = nRng.Value & ".xls"

ActiveWorkbook.SaveAs Filename:=myPath & "\" & fName, _
FileFormat:=xlNormal, _
Password:="", _
WriteResPassword:="", _
ReadOnlyRecommended:=False, _
CreateBackup:=False

ActiveWorkbook.Close

Call TransfertoLog

Call Clear

End Sub




Jenny B. wrote:

Hi Dave,

Earlier this week, you responded to a question I had and Im wondering if
you can help me once again.

Since I havent picked up on this project again until now, I didnt realize
I made a mistake and the solution you provided me with didnt quite work like
I thought. I had requested a way to automatically save a copy of the current
users workbook page to the desktop without the code being specific (this
will be accessed by multiple users). When I replace SpecialFolders (10) with
SpecialFolders (Desktop), the file still saves in the same place
C:\Documents and Settings\Jenny and its title is now Desktop and the range
value (not quite correct).

I know Im just missing just one step to have it placed directly in the
Desktop Folder (so it will appear on my desktop), but Im not sure how to
accomplish it.

Thank you for your thoughts in advance Jenny B.


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Question for Dave Peterson

Ps. it's usually a good idea to post the code (or snippet of code) that's
causing the trouble. That way, potential responders don't have to spend too
much time looking for your old posts.



Jenny B. wrote:

Hi Dave,

Earlier this week, you responded to a question I had and Im wondering if
you can help me once again.

Since I havent picked up on this project again until now, I didnt realize
I made a mistake and the solution you provided me with didnt quite work like
I thought. I had requested a way to automatically save a copy of the current
users workbook page to the desktop without the code being specific (this
will be accessed by multiple users). When I replace SpecialFolders (10) with
SpecialFolders (Desktop), the file still saves in the same place
C:\Documents and Settings\Jenny and its title is now Desktop and the range
value (not quite correct).

I know Im just missing just one step to have it placed directly in the
Desktop Folder (so it will appear on my desktop), but Im not sure how to
accomplish it.

Thank you for your thoughts in advance Jenny B.


--

Dave Peterson
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 94
Default Question for Dave Peterson

Hi Dave,

Thank you so much. You were exactly right that I was missing a dash and now
it works fine.

Sorry for not providing the original code along with my question. I'm
usually a bit more on the ball, but I forgot and didn't attach it for that
particular post - my apologies

Thanks again and appreciate you taking the time to respond - Jenny B.


"Dave Peterson" wrote:

Ps. it's usually a good idea to post the code (or snippet of code) that's
causing the trouble. That way, potential responders don't have to spend too
much time looking for your old posts.



Jenny B. wrote:

Hi Dave,

Earlier this week, you responded to a question I had and Iâm wondering if
you can help me once again.

Since I havenât picked up on this project again until now, I didnât realize
I made a mistake and the solution you provided me with didnât quite work like
I thought. I had requested a way to automatically save a copy of the current
userâs workbook page to the desktop without the code being specific (this
will be accessed by multiple users). When I replace SpecialFolders (10) with
SpecialFolders (âœDesktopâ), the file still saves in the same place â
C:\Documents and Settings\Jenny and itâs title is now Desktop and the range
value (not quite correct).

I know Iâm just missing just one step to have it placed directly in the
Desktop Folder (so it will appear on my desktop), but Iâm not sure how to
accomplish it.

Thank you for your thoughts in advance â Jenny B.


--

Dave Peterson

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Question for Dave Peterson

Glad you got it working!

Jenny B. wrote:

Hi Dave,

Thank you so much. You were exactly right that I was missing a dash and now
it works fine.

Sorry for not providing the original code along with my question. I'm
usually a bit more on the ball, but I forgot and didn't attach it for that
particular post - my apologies

Thanks again and appreciate you taking the time to respond - Jenny B.

"Dave Peterson" wrote:

Ps. it's usually a good idea to post the code (or snippet of code) that's
causing the trouble. That way, potential responders don't have to spend too
much time looking for your old posts.



Jenny B. wrote:

Hi Dave,

Earlier this week, you responded to a question I had and Iâm wondering if
you can help me once again.

Since I havenât picked up on this project again until now, I didnât realize
I made a mistake and the solution you provided me with didnât quite work like
I thought. I had requested a way to automatically save a copy of the current
userâs workbook page to the desktop without the code being specific (this
will be accessed by multiple users). When I replace SpecialFolders (10) with
SpecialFolders (âœDesktopâ), the file still saves in the same place â
C:\Documents and Settings\Jenny and itâs title is now Desktop and the range
value (not quite correct).

I know Iâm just missing just one step to have it placed directly in the
Desktop Folder (so it will appear on my desktop), but Iâm not sure how to
accomplish it.

Thank you for your thoughts in advance â Jenny B.


--

Dave Peterson


--

Dave Peterson
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
Dave Peterson - last question Roger Excel Discussion (Misc queries) 6 February 29th 08 09:17 PM
Follow-up Question for Dave Peterson Roger Excel Discussion (Misc queries) 3 February 28th 08 04:27 PM
Macro Question for Dave Peterson JoeSpareBedroom Excel Discussion (Misc queries) 5 February 14th 07 06:45 PM
Print question - Calling Dave Peterson! Ant Excel Discussion (Misc queries) 6 March 28th 06 12:57 PM
Print question - Calling Dave Peterson! Tom Ogilvy Excel Discussion (Misc queries) 1 March 27th 06 06:04 PM


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