Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
save as - to any desktop
Hello,
The code below works for me, but how do I : a.) Make this WB "save as" a copy to any individuals desktop? in other words what can I use for a wildcard for the " XXX" in XXX.TRGROUP. (XXX would be a name like jsmith, jdoe etc) and b.) How can this be done as soon as the WB is opened from the original read only file, so once opened, it saves a copy directly to the PC's desktop - without prompting-? ActiveWorkbook.SaveAs Filename:= _ "C:\Documents and Settings\XXX.TRGROUP\Desktop\copy of.xls", FileFormat:= _ xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False _ , CreateBackup:=False Your help is as always greatly appreciated. Thank you Driftwood |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
save as - to any desktop
DeskTop = environ("UserProfile")
will give "C:\Documents and Settings\jsmith DeskTop = environ("UserProfile") bkname = ".TRGROUP\Desktop\copy of.xls" ActiveWorkbook.SaveAs Filename:= DeskTop & bkname, _ FileFormat:= xlNormal, _ Password:="", _ WriteResPassword:="", _ ReadOnlyRecommended:=False, _ CreateBackup:=False "Driftwood" wrote: Hello, The code below works for me, but how do I : a.) Make this WB "save as" a copy to any individuals desktop? in other words what can I use for a wildcard for the " XXX" in XXX.TRGROUP. (XXX would be a name like jsmith, jdoe etc) and b.) How can this be done as soon as the WB is opened from the original read only file, so once opened, it saves a copy directly to the PC's desktop - without prompting-? ActiveWorkbook.SaveAs Filename:= _ "C:\Documents and Settings\XXX.TRGROUP\Desktop\copy of.xls", FileFormat:= _ xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False _ , CreateBackup:=False Your help is as always greatly appreciated. Thank you Driftwood |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
save as - to any desktop
Thank You Joel.
Took me a few minutes to realize that the ".TRGROUP" was actually part of the UserProfile I had to delete it because it was trying to use "jsmith.TRGROUP.TRGROUP" So now it is: bkname = "\Desktop\copy of.xls" And works just GREAT! Cheers to all the great responders out here! Driftwood "Joel" wrote: DeskTop = environ("UserProfile") will give "C:\Documents and Settings\jsmith DeskTop = environ("UserProfile") bkname = ".TRGROUP\Desktop\copy of.xls" ActiveWorkbook.SaveAs Filename:= DeskTop & bkname, _ FileFormat:= xlNormal, _ Password:="", _ WriteResPassword:="", _ ReadOnlyRecommended:=False, _ CreateBackup:=False "Driftwood" wrote: Hello, The code below works for me, but how do I : a.) Make this WB "save as" a copy to any individuals desktop? in other words what can I use for a wildcard for the " XXX" in XXX.TRGROUP. (XXX would be a name like jsmith, jdoe etc) and b.) How can this be done as soon as the WB is opened from the original read only file, so once opened, it saves a copy directly to the PC's desktop - without prompting-? ActiveWorkbook.SaveAs Filename:= _ "C:\Documents and Settings\XXX.TRGROUP\Desktop\copy of.xls", FileFormat:= _ xlNormal, Password:="", WriteResPassword:="", ReadOnlyRecommended:=False _ , CreateBackup:=False Your help is as always greatly appreciated. Thank you Driftwood |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Desktop Save Question | Excel Discussion (Misc queries) | |||
difficulties using vba to save to the desktop | Excel Programming | |||
Save to default desktop | Excel Discussion (Misc queries) | |||
Save .xls as .txt In DeskTop | Excel Programming | |||
How do I save to the desktop across OS's? | Excel Programming |