Your Products have been synced, click here to refresh
Sub Main 'pcdlrn declarations And Open ppg Dim App As Object Set App = CreateObject("PCDLRN.Application") Dim Part As Object Set Part = App.ActivePartProgram Dim Ew As Object Set Ew = Part.EditWindow Dim Cmds As Object Set Cmds = Part.Commands Dim Cmd As Object Dim DCmd As Object Dim DcmdID As Object Dim ObjFso Set objFSO = CreateObject("Scripting.FileSystemObject") 'Excel Declarations Dim xlApp As Object Set xlApp = CreateObject("Excel.Application") Dim xlWorkbooks As Object Set xlWorkbooks = xlapp.Workbooks Dim xlWorkbook As Object Dim xlSheet As Object Dim fncSheet As Object Dim count As Integer Dim xlWorksheets As String Dim xlWorksheet As String Dim DimID As String Dim ReportDim As String Dim CheckDim As String Dim FilePath, SheetPath As String 'Check To see If results file exists myTitle$ = "User Input" Prompt$ = "Please Input Directory for blank Excel Document, or Reference Document. Including file name." Default$ = "C:\" FilePath = InputBox$(Prompt$, myTitle$, Default$) myTitle$ = "User Input" Prompt$ = "Please Input Sheet Name for Data Population" Default$ = "Sheet1" SheetPath = InputBox$(Prompt$, myTitle$, Default$) ResFileExists = FilePath & ".xlsx" Dim TempFilename,TempSheetName TempSheetName = SheetPath If objFSO.FileExists(ResFileExists) = False Then 'If the file did Not exist, Then use a default file location stored As a precaution TempFilename = "X:\00 Sub Folders\13 Engineering\09 Inspection\02 CMM Programs & Documentation\" & "Prog Template.xlsx" [COLOR=#FF0000][B] '^^ You need to adjust this line to fit your needs. This is a security line to always point to a guaranteed excel document for use. _ 'Ex. "C:\Test.xlsx"[/B][/COLOR] Else TempFilename = ResFileExists End If On Error GoTo ErrorCheck
Sub Main 'pcdlrn declarations And Open ppg Dim App As Object Set App = CreateObject("PCDLRN.Application") Dim Part As Object Set Part = App.ActivePartProgram Dim Ew As Object Set Ew = Part.EditWindow Dim Cmds As Object Set Cmds = Part.Commands Dim Cmd As Object Dim DCmd As Object Dim DcmdID As Object Dim ObjFso Set objFSO = CreateObject("Scripting.FileSystemObject") 'Excel Declarations Dim xlApp As Object Set xlApp = CreateObject("Excel.Application") Dim xlWorkbooks As Object Set xlWorkbooks = xlapp.Workbooks Dim xlWorkbook As Object Dim xlSheet As Object Dim fncSheet As Object Dim count As Integer Dim xlWorksheets As String Dim xlWorksheet As String Dim DimID As String Dim ReportDim As String Dim CheckDim As String Dim FilePath, SheetPath As String 'Check To see If results file exists myTitle$ = "User Input" Prompt$ = "Please Input Directory for blank Excel Document, or Reference Document. Including file name." Default$ = "C:\" FilePath = InputBox$(Prompt$, myTitle$, Default$) myTitle$ = "User Input" Prompt$ = "Please Input Sheet Name for Data Population" Default$ = "Sheet1" SheetPath = InputBox$(Prompt$, myTitle$, Default$) ResFileExists = FilePath & ".xlsx" Dim TempFilename,TempSheetName TempSheetName = SheetPath If objFSO.FileExists(ResFileExists) = False Then 'If the file did Not exist, Then use a default file location stored As a precaution TempFilename = "X:\00 Sub Folders\13 Engineering\09 Inspection\02 CMM Programs & Documentation\" & "Prog Template.xlsx" [COLOR=#FF0000][B] '^^ You need to adjust this line to fit your needs. This is a security line to always point to a guaranteed excel document for use. _ 'Ex. "C:\Test.xlsx"[/B][/COLOR] Else TempFilename = ResFileExists End If On Error GoTo ErrorCheck
© 2024 Hexagon AB and/or its subsidiaries. | Privacy Policy | Cloud Services Agreement |