LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 220
Default Create a new Wb on the Desktop

I'm trying to create a new Wb and save it to the desktop... When I run
this, it says the file can't be located... What am I missing?


Sub Test()
Dim csFILENAME As String
Dim wsh As Object
Dim Ws As Worksheet
Dim Wb As Workbook

Set wsh = CreateObject("wscript.shell")
csFILENAME = wsh.SpecialFolders.Item("Desktop")

Set xL = New Excel.Application
Set Wb = xL.Workbooks.Open(csFILENAME & "\" & "Test" & ".xls")

End Sub


Thanks,
-- Dan

 
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
CREATE DESKTOP SHORTCUT? PARSLEY DUMPLING Excel Discussion (Misc queries) 2 July 30th 09 11:51 AM
How do I create a desktop shortcut for a specific .xlsm file? jwatters Excel Discussion (Misc queries) 3 March 30th 09 06:59 PM
In Excel 2007, how can you create a desktop shortcut for a file? Mark 246 Excel Discussion (Misc queries) 6 June 25th 07 08:05 PM
Use a macro to create a desktop shortcut? [email protected] Excel Programming 2 March 1st 06 11:28 PM
how do i create a short cut on my desktop for a excell file? Gary Excel Discussion (Misc queries) 3 February 3rd 05 06:00 PM


All times are GMT +1. The time now is 03:49 PM.

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"