Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Dave Peterson - last question | Excel Discussion (Misc queries) | |||
Follow-up Question for Dave Peterson | Excel Discussion (Misc queries) | |||
Macro Question for Dave Peterson | Excel Discussion (Misc queries) | |||
Print question - Calling Dave Peterson! | Excel Discussion (Misc queries) | |||
Print question - Calling Dave Peterson! | Excel Discussion (Misc queries) |