M
Maperalia
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 **************************
"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 **************************