Advertisement
|
[x]
Attachment Details
|
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: |
Private Sub ACSWITHMVFToExcel()
ExportedFile = "\\nydfs1\root\lib\CONTROLLERS\IIG\CASH_CONTROL\ccshared\AbandonedProperty\UDL\Access\Reconcile\UDL.ACSWMVF.TALLINT1.TALLINT1" & "." & intYearSP & "." & Format(Now, "mmddhhnnss") & ".ARD.OUT.XLS"
DoCmd.TransferSpreadsheet acExport, 8, "dbo.tblFlACSMV", ExportedFile, True, ""
If isFileExist(ExportedFile) Then StartACSWMV ExportedFile
strFile1 = Left(ExportedFile, Len(ExportedFile) - 4)
FileCopy ExportedFile, strFile1
strFile = Left(ExportedFile, Len(ExportedFile) - 8)
intFile = VBA.FreeFile
Open strFile For Append Access Write Lock Write As #intFile
Close #intFile
strFile2 = Right(strFile1, Len(strFile1) - 95)
strFile = Left(ExportedFile, Len(ExportedFile) - 8) & ".IND"
intFile = VBA.FreeFile
Open strFile For Append Access Write Lock Write As #intFile
Print #intFile, "CODEPAGE:850"
Print #intFile, "COMMENT:--------------Xcel Report load-------------------"
Print #intFile, "GROUP_FIELD_NAME:REPTID"
Print #intFile, "GROUP_FIELD_VALUE:ACSWMVF"
Print #intFile, "GROUP_FIELD_NAME:REPTYR"
Print #intFile, "GROUP_FIELD_VALUE:" & intYearSP
Print #intFile, "GROUP_FIELD_NAME:ReportDate"
Print #intFile, "GROUP_FIELD_VALUE:" & Format(Now, "mm/dd/yyyy")
Print #intFile, "GROUP_OFFSET:0"
Print #intFile, "GROUP_LENGTH:0"
Print #intFile, "GROUP_FILENAME:/clientdoc/" & strFile2
Close #intFile
Beep
MsgBox "ACS With MV Fall Report has been sent to On Demand", vbOKOnly, ""
FileCopy ExportedFile, "\\nydfs1\root\lib\CONTROLLERS\IIG\CASH_CONTROL\ccshared\AbandonedProperty\UDL\Access\Reconcile\ACSWMVF_" & Format(Now(), "MMDDYYYY") & ".XLS"
Shell "EXCEL.EXE" & " " & "\\nydfs1\root\lib\CONTROLLERS\IIG\CASH_CONTROL\ccshared\AbandonedProperty\UDL\Access\Reconcile\ACSWMVF_" & Format(Now(), "MMDDYYYY") & ".XLS"
End Sub
Private Sub StartACSWMV(filename)
Set xlApp = New Excel.Application
Set xlWB = xlApp.Workbooks.Open(filename)
Set xlWS = xlWB.Worksheets(1)
xlWS.Columns.AutoFit
xlWS.Range("W2:W65535").NumberFormat = "#,##0.00"
xlWS.Range("X2:X65535").NumberFormat = "#,##0.000"
xlWS.Range("AE2:AE65535").NumberFormat = "#,##0.00"
xlWS.Rows("1:2").Insert Shift:=xlDown
xlWS.Range("A1") = "UDL ACS With MV Report For " & Format(Now(), "MM/DD/YYYY")
xlWB.Close True
Set xlWB = Nothing
xlApp.Quit
End Sub
|
|
[x]
The Solution Rating System
|
||
|
With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.
Your Input Matters If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support. Thank you! |
||
|
Loading Advertisement... |
| Open Discussion |