Access.2007.VBA.Bibl..

(John Hannent) #1

Dim appExcel As Excel.Application
Dim dteWeekEnding As Date
Dim lngCount As Long
Dim lngEmployeeID As Long
Dim n As Long
Dim rngCC As Excel.Range
Dim rngDay As Excel.Range
Dim rngOT As Excel.Range
Dim rngPC As Excel.Range
Dim rngRH As Excel.Range
Dim rngTotal As Excel.Range
Dim rngTotalAbove As Excel.Range
Dim rstAll As DAO.Recordset
Dim rstOne As DAO.Recordset
Dim strDocsPath As String
Dim strEmployeeName As String
Dim strPrompt As String
Dim strQuery As String
Dim strSaveName As String
Dim strSheet As String
Dim strSQL As String
Dim strTemplate As String
Dim strTemplateFile As String
Dim strTemplatePath As String
Dim strTitle As String
Dim wkb As Excel.Workbook
Dim wks As Excel.Worksheet
Dim lbl As Access.Label


Set dbs = CurrentDb
Set rstAll =
dbs.OpenRecordset(“qryCurrentTimesheetInfo”,

dbOpenDynaset)
rstAll.MoveLast
rstAll.MoveFirst
lngCount = rstAll.RecordCount
If lngCount = 0 Then
MsgBox “No current time sheet records to export”
GoTo ErrorHandlerExit
Else
Set lbl =
Forms![fdlgTimesheets]![lblCreatingWorksheets]
Debug.Print lngCount

& “ current time sheet records to transfer to Excel”
lbl.Visible = True
End If


Working with Excel Worksheets 7

Free download pdf