View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Robin01 Robin01 is offline
external usenet poster
 
Posts: 1
Default active cell control using scripts


Hello all,

I found a script for my excel form and basically what it does is
searches for the next available blank row and adds a record or whatever
I entered in the form.

As of now the script does a search on A1(col). Range(“A1”) and it
keeps going down until it finds a free cell in col A. so the first col
would be 1,0, sec col would be 1,1, third would be 1,2 and so forth.

What I need to do is do a search on col B and start the input from col
a (0,0) col b(1,1) col c(0,2) and soo forth.
Problem when I change the second line to B1 it doesn’t see col A as
(0,0) rather the (0,0) starts from col b.
I’m somewhat new to this but played with the cols but I can’t get it to
start from col A.
Any ideas?
copy/pasted part of the code for your view:

ActiveWorkbook.Sheets("doctors").Activate
Range("B1").Select
Do
If IsEmpty(ActiveCell) = False Then
ActiveCell.Offset(1, 0).Select
End If
Loop Until IsEmpty(ActiveCell) = True

ActiveCell.Value = info_external_id.Value

If option_physician = True Then
ActiveCell.Offset(0, 1).Value = "Y"
ElseIf option_referrals = True Then
ActiveCell.Offset(0, 14).Value = "Y"
End If

ActiveCell.Offset(0, 2) = info_external_id.Value
ActiveCell.Offset(0, 3) = info_last_name.Value


--
Robin01
------------------------------------------------------------------------
Robin01's Profile: http://www.excelforum.com/member.php...o&userid=35269
View this thread: http://www.excelforum.com/showthread...hreadid=562586