Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 203
Default Create a folder from excel

Hi all, i know it is possible to creat a shortcut on the desktop from
excel and would like to know if it is possible to create a folder from
excel as well ?
If so, could you help me some code please.

thanks in advance,

Tempy

*** Sent via Developersdex http://www.developersdex.com ***
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Create a folder from excel

Make a folder

MkDir "C:\Mytest\mine"

you will need to create every level if they don't exsit.

Shortcut


'----------------------------------------------------------------
Sub CreateShortCut()
'----------------------------------------------------------------
Dim oWSH As Object
Dim oShortcut As Object
Dim sPathDeskTop As String

Set oWSH = CreateObject("WScript.Shell")
sPathDeskTop = oWSH.SpecialFolders("Desktop")

Set oShortcut = oWSH.CreateShortCut(sPathDeskTop & "\" & _
ActiveWorkbook.Name & ".lnk")
With oShortcut
.TargetPath = ActiveWorkbook.FullName
.Save
End With
Set oWSH = Nothing

End Sub



--
HTH

Bob Phillips

"Tempy" wrote in message
...
Hi all, i know it is possible to creat a shortcut on the desktop from
excel and would like to know if it is possible to create a folder from
excel as well ?
If so, could you help me some code please.

thanks in advance,

Tempy

*** Sent via Developersdex http://www.developersdex.com ***



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Create a folder from excel

Tempy,
MkDir

NickHK

"Tempy" wrote in message
...
Hi all, i know it is possible to creat a shortcut on the desktop from
excel and would like to know if it is possible to create a folder from
excel as well ?
If so, could you help me some code please.

thanks in advance,

Tempy

*** Sent via Developersdex http://www.developersdex.com ***



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 203
Default Create a folder from excel

Thanks so much Bob, how's the weather there ?

Tempy

*** Sent via Developersdex http://www.developersdex.com ***
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Create a folder from excel

Not too bad, autumn coming in now though.

--
HTH

Bob Phillips

"Tempy" wrote in message
...
Thanks so much Bob, how's the weather there ?

Tempy

*** Sent via Developersdex http://www.developersdex.com ***





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 203
Default Create a folder from excel

Hi Bob, sorry for the delay, here it is really nice hot sunny days,
today 32 !!
Bob, is it possible to assign a specific icon to the shortcut that you
create ?

Tempy

*** Sent via Developersdex http://www.developersdex.com ***
  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Create a folder from excel

Yeah, just use the .IconLocation property when creating the shortcut.

--
HTH

Bob Phillips

"Tempy" wrote in message
...
Hi Bob, sorry for the delay, here it is really nice hot sunny days,
today 32 !!
Bob, is it possible to assign a specific icon to the shortcut that you
create ?

Tempy

*** Sent via Developersdex http://www.developersdex.com ***



  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 203
Default Create a folder from excel

Hi Bob, thanks. I am not sure where to put it. Let me explain what i am
wanting to do.... should of done that before i guess. I want to send all
the users an excel file with the code in and when they open it, it will
create the folders and save the file in there. I then create a short cut
and then want to assign a different icon to it. I am not sure how to do
that portion, should i insert the icon on the spread sheet so that it
can save it also to the folder ?

Tempy

*** Sent via Developersdex http://www.developersdex.com ***
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
how do you create file folder labels in excel? rebecca_vsp New Users to Excel 2 May 16th 08 02:00 AM
How to create the hyperlink from Excel doc. to the folder Anton Excel Discussion (Misc queries) 4 September 6th 05 02:10 AM
How do I Create backup of excel file in other folder khalid Excel Discussion (Misc queries) 1 May 24th 05 11:01 AM
Create Folder and Text File in folder Todd Huttentsine Excel Programming 2 April 29th 04 03:41 PM
Create Folder / Copy Folder / Replace Murray Outtrim[_2_] Excel Programming 0 February 24th 04 06:40 PM


All times are GMT +1. The time now is 09:00 PM.

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"