VBA code issue...some help

lucky12341

Board Regular
Joined
Nov 4, 2005
Messages
121
The VBA code for a part form I am using is listed below. The file name is "Book1.xls" and there are three worksheets in it: "Inventory", "Purchased", "Used". This form is linked to the "Inventory" sheet. When I click on the accept button it brings up the debugger and says the form doesnt work, the others buttons work fine. Can anyone help me? thanks.

Private Sub Accept_Click()

ActiveWorkbook.Sheets("Inventory").Activate

Range("A1").Select

Do

If IsEmpty(ActiveCell) = FalseThen

ActiveCell.Offset(1, 0).Select

End If

Loop Until IsEmpty(ActiveCell) = True

ActiveCell.Value = PObox.Value

ActiveCell.Offset(0, 1) = PCMKbox.Value

ActiveCell.Offset(0, 2) = Partbox.Value

ActiveCell.Offset(0, 3) = Descriptionbox.Value

ActiveCell.Offset(0, 4) = Materialbox.Value

ActiveCell.Offset(0, 5) = Drawingbox.Value

ActiveCell.Offset(0, 6) = Qtybox.Value

ActiveCell.Offset(0, 7) = HICbox.Value


End Sub
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
lucky12341 said:
When I click on the accept button it brings up the debugger and says the form doesnt work

That's a bit unclear. What line is highlighted in the debugger, and what's the error message?
 
Upvote 0
Compile Error:
Syntax Error

That is the error message I get, as for the highlighted item it is "Private Sub Accept_Click()" with "If IsEmpty(ActiveCell) = FalseThen" colored in red.
 
Upvote 0
Oops my bad this line is highlighted also, I think the issue is here...

If IsEmpty(ActiveCell) = FalseThen
 
Upvote 0

Forum statistics

Threads
1,214,787
Messages
6,121,561
Members
449,038
Latest member
Guest1337

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