Your Products have been synced, click here to refresh
'decalre top level object variables (pcdmis / file scripting / excel) Dim pcapp As PCDLRN.Application Dim oxl As Excel.Application 'declare global variables (public/shared project wide) Dim mypath As String Dim cmdID As String Sub main() 'get the path from cell A1 Set oxl = CreateObject("Excel.Application") Dim wrkbooks As Excel.Workbooks Set wrkbooks = Excel.Application.Workbooks Dim wrkbook As Excel.Workbook For Each wrkbook In wrkbooks If wrkbook.Name = "DaSalo(ver1).xlsm" Then Dim wrksheet As Excel.Worksheet Set wrksheet = wrkbook.Worksheets(1) mypath = wrksheet.Range("A1") cmdID = wrksheet.Range("A2") Debug.Print mypath End If Next 'open pc-dmis Set pcapp = CreateObject("pcdlrn.application") Dim fname As String fname = Dir(mypath & "\*.prg") Do While fname <> "" Debug.Print fname ''Call pc-dmis subroutine here DoShitWithDmis (fname) fname = Dir() Loop End Sub
'decalre top level object variables (pcdmis / file scripting / excel) Dim pcapp As PCDLRN.Application Dim oxl As Excel.Application 'declare global variables (public/shared project wide) Dim mypath As String Dim cmdID As String Sub main() 'get the path from cell A1 Set oxl = CreateObject("Excel.Application") Dim wrkbooks As Excel.Workbooks Set wrkbooks = Excel.Application.Workbooks Dim wrkbook As Excel.Workbook For Each wrkbook In wrkbooks If wrkbook.Name = "DaSalo(ver1).xlsm" Then Dim wrksheet As Excel.Worksheet Set wrksheet = wrkbook.Worksheets(1) mypath = wrksheet.Range("A1") cmdID = wrksheet.Range("A2") Debug.Print mypath End If Next 'open pc-dmis Set pcapp = CreateObject("pcdlrn.application") Dim fname As String fname = Dir(mypath & "\*.prg") Do While fname <> "" Debug.Print fname ''Call pc-dmis subroutine here DoShitWithDmis (fname) fname = Dir() Loop End Sub
© 2024 Hexagon AB and/or its subsidiaries. | Privacy Policy | Cloud Services Agreement |