Database Reference
In-Depth Information
output. Section 14.4.2 describes these files. Two of the files are written directly from the information in the
Excel workbook. The third file is copied from a directory that stores production SAS code into the working
directory for the current processing period.
Figure 14.26: UserForm Showing Button and Switch to Controls Copying the Production
SAS Code.
Figure 14.27: VBA Code in the UserForm That Copies the SAS Code from the Production
Directory.
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'' Copy source SAS Code from the production directory to the work area
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'object.Copy destination[, overwrite]
Set sas_O = CreateObject("Scripting.FileSystemObject")
Prod_path = Worksheets("Control_info").Range("a15").Value
sas_code_file = Prod_path + "\" + Worksheets(Program_Number.Value + _
"_Parms").Range("a3").Value
new_code_file = Full_Path + "\" + Worksheets(Program_Number.Value + _
"_Parms").Range("a3").Value
overwrite = True
sas_O.copyfile sas_code_file, new_code_file, overwrite
Set sas_O = Nothing
14.4.4 Verify the Output Batch File Points to the Correct SAS Run Time
Module
The VBA code in the UserForm1 code module of the workbook contains VBA code to write data out to a
file with the command “Print #2, “ some text to output ”. This code writes the Windows Batch file (*.bat)
 
Search WWH ::




Custom Search