Hello,
Please note that I am not an expert.
---------------------------------------------------------------
Sub btnSubmit_Click()
asutest False: aeetest False I do not know what this does?
kaReport.ColholFmtest
End Sub
I do not understand this routine.
--------------------------------------------------------
Application.ScreenUpdating = False only applies before the code. You cannot
have it in a routine by itself. it will not do anything. It will set itself
to true at End Sub
--------------------------------------------------------
If you dimension a variable then use it -
Dim i as integer
i = freports.LB_KADates.ListIndex
If freports.LB_KADates.ListIndex = 0 Then
if i=0
Make sure you Dim it at the start of the routine
Real Experts Dimension everything.
--------------------------------------------------------
"On error goto" is poor coding. It does not always work as expected. You
should "Handle" all expected errors. The same goes for "On Error Resume Next".
If you use On Error goto 0 then you have to reference the line. Goto 0 means
goto Line: 0, Excel 2003 hates unreferenced references. Use a word instead
of a number.
On Error Goto Fred
code here
Fred:
End Sub
Error Handling takes up nearly 75% of the entire coding.
--------------------------------------------------------
If MsgBox("Do you want to print the second page containing additional
information?", vbQuestion + vbYesNo, "Colleague Holiday Form") = vbYes
Dim Ans
ans="Do you want to print the second page containing additional
information?"
msgbox(ans, vbQuestion + vbYesNo, "Colleague Holiday Form")
if ans=vbyes then
else
end if
---------------------------------------------
Public Sub aeetest(pEnabled As Boolean)
Application.enableEvents = False
End Sub
I am not sure if this will do anything by itself.
--------------------------------------------------------
strBadge = ThisWorkbook.Worksheets("Data1").Range
("A3").offset(rI1, 0).Text
Worksheets("Details1").Range("badge_number").value
= strBadge
Instead of ".value", maybe ".text" strBadge is a string ie text.
Dim intnum as integer
intNum=freports.LB_Colleagues.ListCount - 1
This is as far as I've got but I am sure others will contribute with far
more extensive help.
Personally I do not Dim a listbox.
See here for Sample Utilities.
http://au.geocities.com/excelmarksway
http://www.geocities.com/excelmarksway