Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Refering to Desktop

How between two ""

refer to the desktop within windows xp.

for example -

a:\hello.doc
is floppy

.../../docs&settings//desktop

or something will always give you the desktop!

I dont know if you but please tell me if you can!

Lynda
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Refering to Desktop

Try this Lynda

Sub DesktopExample()
Dim WSHShell As Object
Dim DesktopPath As String
Set WSHShell = CreateObject("WScript.Shell")
DesktopPath = WSHShell.SpecialFolders("Desktop")
MsgBox DesktopPath
Set WSHShell = Nothing
End Sub




--
Regards Ron de Bruin
http://www.rondebruin.nl



"Lynda" wrote in message ...
How between two ""

refer to the desktop within windows xp.

for example -

a:\hello.doc
is floppy

../../docs&settings//desktop

or something will always give you the desktop!

I dont know if you but please tell me if you can!

Lynda



  #3   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Refering to Desktop

Sub ExportChartJPG()
ActiveChart.Export Filename:="Desktop Example",
FilterName:="jpeg"
End Sub

Ron I have tried to put your code in a module with my
other code but it does not work. how do I tell it to find
out the location of the desktop to look at the code in
the module?


-----Original Message-----
Try this Lynda

Sub DesktopExample()
Dim WSHShell As Object
Dim DesktopPath As String
Set WSHShell = CreateObject("WScript.Shell")
DesktopPath = WSHShell.SpecialFolders("Desktop")
MsgBox DesktopPath
Set WSHShell = Nothing
End Sub




--
Regards Ron de Bruin
http://www.rondebruin.nl



"Lynda" wrote in

message ...
How between two ""

refer to the desktop within windows xp.

for example -

a:\hello.doc
is floppy

../../docs&settings//desktop

or something will always give you the desktop!

I dont know if you but please tell me if you can!

Lynda



.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,758
Default Refering to Desktop

Sub DesktopExample()
Dim WSHShell As Object
Dim DesktopPath As String
Set WSHShell = CreateObject("WScript.Shell")
DesktopPath = WSHShell.SpecialFolders("Desktop")
ActiveChart.Export Filename:=DesktopPath & "\" & "Desktop Example.jpg", _
FilterName:="jpeg"
Set WSHShell = Nothing
End Sub



wrote:

Sub ExportChartJPG()
ActiveChart.Export Filename:="Desktop Example",
FilterName:="jpeg"
End Sub

Ron I have tried to put your code in a module with my
other code but it does not work. how do I tell it to find
out the location of the desktop to look at the code in
the module?

-----Original Message-----
Try this Lynda

Sub DesktopExample()
Dim WSHShell As Object
Dim DesktopPath As String
Set WSHShell = CreateObject("WScript.Shell")
DesktopPath = WSHShell.SpecialFolders("Desktop")
MsgBox DesktopPath
Set WSHShell = Nothing
End Sub




--
Regards Ron de Bruin
http://www.rondebruin.nl



"Lynda" wrote in

message ...
How between two ""

refer to the desktop within windows xp.

for example -

a:\hello.doc
is floppy

../../docs&settings//desktop

or something will always give you the desktop!

I dont know if you but please tell me if you can!

Lynda



.


--

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
refering to other workbooks cjbarron5 Excel Discussion (Misc queries) 2 June 2nd 08 08:17 PM
EXCEL FILES SAVED TO DESKTOP WILL NOT OPEN FROM DESKTOP randy111 Excel Discussion (Misc queries) 3 January 13th 08 10:38 PM
Refering a cell Arun Kumar Saha Excel Worksheet Functions 2 June 18th 07 12:48 PM
Refering to Cells madh83 Excel Worksheet Functions 3 July 19th 06 11:39 PM
Refering to Cell's Name in Macro LSB Excel Programming 5 August 8th 03 03:51 AM


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