PC Review


Reply
Thread Tools Rate Thread

Code to Create Directory problem

 
 
Maperalia
Guest
Posts: n/a
 
      22nd Dec 2008
I have a statement that save as a file with the description typed in the cell
"C1" (see code below). However. I need to save it under a new directory with
the same name. Unfortunately, the code is creating the directory only and no
the file.
Could you please tell me what I am doing wrong?

Thanks in advance.
Maperalia

'**** Start Save as the Part **************************
'Sub SaveAs()
Dim WO As String
Dim Progname As String

Set swApp = Application.SldWorks
Set swApp = GetObject("SldWorks.Application")
Set Part = swApp.ActiveDoc

WO = Worksheets("Test").Range("C1")
MkDir "C:\Top\" & Format(Sheets("Test").Range("C1").Value)
Directory = Format(Sheets("Test").Range("C1").Value)
longstatus = Part.SaveAs3("C:\Top\" & Directory & " \ " & WO & ".sldprt", 0,
2)
'End Sub
'**** End Save as the Part **************************
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Web Setup project - create virtual directory & point to another location in directory structure kplkumar@gmail.com Microsoft C# .NET 0 12th Apr 2006 06:26 PM
Need to create vb code for PPT to browse a logo directory then insert on selection Tyron Microsoft Powerpoint 0 10th Jun 2005 04:37 PM
Problem with /Code directory =?Utf-8?B?U3RldmUgU3Rld2FydA==?= Microsoft ASP .NET 0 20th Oct 2004 03:03 PM
vcdeploy : error VCD0035: Failed to create the file system directory for the virtual directory. Access is denied. Dominic Microsoft VC .NET 0 17th Jun 2004 01:27 AM
Problem updating Active Directory from code Robin Microsoft ASP .NET 1 28th May 2004 12:19 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:55 PM.