What Do the Numbers stand for?
Can someone please review the code below and tell me what the (0, 1), (0, 2) and so on stands for within it i.e., is this in relation to the cell in the excel worksheet the answer should be placed or am I way off?
Thanks
Private Sub cmdOK_Click()
ActiveWorkbook.Sheets("Course Bookings").Activate
Range("A1").Select
Do
If IsEmpty(ActiveCell) = FalseThen
ActiveCell.Offset(1, 0).Select
End If
Loop Until IsEmpty(ActiveCell) = True
ActiveCell.Value = txtName.Value
ActiveCell.Offset(0, 1) = txtPhone.Value
ActiveCell.Offset(0, 2) = cboDepartment.Value
ActiveCell.Offset(0, 3) = cboCourse.Value
If optIntroduction = True Then
ActiveCell.Offset(0, 4).Value = "Intro"
ElseIf optIntermediate = True Then
ActiveCell.Offset(0, 4).Value = "Intermed"
Else
ActiveCell.Offset(0, 4).Value = "Adv"
End If
If chkLunch = True Then
ActiveCell.Offset(0, 5).Value = "Yes"
Else
ActiveCell.Offset(0, 5).Value = "No"
End If
Re: What Do the Numbers stand for?
Hello,
That's VBA (not VB6) code.
Example :
Offset(0, 1) refers to the cell which, on the same Line (0), is located 5 columns further.
Re: What Do the Numbers stand for?
Except that should be Offset(0, 5). Isn't it, moa?
Re: What Do the Numbers stand for?
Hello, Wof :
Of course (I don't know wether my fingers are too thick or my eyes too small)... :confused:
Re: What Do the Numbers stand for?
Sorry that I am in the wrong forum!! My brains are just being fried with teaching myself this stuff. I will get out and find the right one, but thank you for your help, it was very much appreciated.