code struggle

aiv

New Member
Joined
Mar 24, 2011
Messages
1
I am new to VBA and attempting to make something happen and it is not happening ;).

Here is the part that is not working. I think.

What I want this to do is

#1 to look into a cell and if the cell is full to compare it to the values and if they are same to place them in the cells to the right.

#2 Part that works is:
or look for and add them to the empty cells down

Code:
Private Sub EnterButton_Click()
ActiveWorkbook.Sheets("Activity").Activate
Cells(3, 1).Select
Do
If IsEmpty(ActiveCell) = False Then
If ActiveCell.Offset(0, 2).Value = CarrierComboBox And ActiveCell.Offset(0, 3).Value = TrailerTextBox Then
With ActiveCell
.Offset(0, 8) = Now
.Offset(0, 9) = StatusComboBox.Value
.Offset(0, 10) = NoteTextBox.Value
End With
End If
ActiveCell.Offset(1, 0).Select
End If
Loop Until IsEmpty(ActiveCell) = True
With ActiveCell
.Value = Now
.Offset(0, 2) = CarrierComboBox.Value
.Offset(0, 3) = TrailerTextBox.Value
.Offset(0, 4) = StatusComboBox.Value
.Offset(0, 5) = NoteTextBox.Value
End With
End Sub

Any input is appreciated.
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN

Forum statistics

Threads
1,224,593
Messages
6,179,791
Members
452,942
Latest member
VijayNewtoExcel

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top