Dear All,
I have an issue with the following
I have a code that saves a file under a name from one of the cells:
And another macro that uses a vbs file that converts the file from xls to PAQ ( I use it to transfer data to SAP):
It’s working with a fixed path.
And now my question is. How to write the code for the second macro to take the file saved from the first macro?
I have an issue with the following
I have a code that saves a file under a name from one of the cells:
Rich (BB code):
Sub zapisintemp()
'
' zapisintemp Macro
'
Dim Path As String
Dim filename As String
'
Range("A1:H1").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Workbooks.Add
ActiveSheet.Paste
Cells.Select
Cells.EntireColumn.AutoFit
Range("A1").Select
Application.CutCopyMode = False
Path = "M:\timeless\exprecup\inventar\IN_temp\import"
filename = Range("E1")
ActiveWorkbook.SaveAs filename:=Path & filename &".xls", FileFormat:=xlNormal
End Sub
And another macro that uses a vbs file that converts the file from xls to PAQ ( I use it to transfer data to SAP):
It’s working with a fixed path.
Rich (BB code):
Sub exceltopaq()
'
' exceltopaq Macro
'
Dim VBScriptFile As String
Dim scriptArg As String
scriptArg ="C:\Users\x\Documents\makro\050319_4P92.xls"
VBScriptFile ="C:\Users\x\Documents\makro\PAQ_converter.vbs"
Shell "wscript " &Q(VBScriptFile) & " " & Q(scriptArg), vbNormalFocus
End Sub
Private FunctionQ(text As String) As String
Q = Chr(34) & text & Chr(34)
End Function
And now my question is. How to write the code for the second macro to take the file saved from the first macro?