-
January 24th, 2010, 08:47 PM
#1
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
-
January 25th, 2010, 02:44 AM
#2
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.
-
January 25th, 2010, 11:29 AM
#3
Re: What Do the Numbers stand for?
Except that should be Offset(0, 5). Isn't it, moa?
-
January 25th, 2010, 03:45 PM
#4
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)...
-
January 25th, 2010, 07:48 PM
#5
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|