ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Skip blank cells; Run-time error 380 (https://www.excelbanter.com/excel-programming/358922-skip-blank-cells%3B-run-time-error-380-a.html)

jbpyron

Skip blank cells; Run-time error 380
 

have a userform with several comboboxes. When I hit the "next" button,
it goes to the next row down, but if that is empty, then I'll get an
error of:

Runtime error '380'
Could not set the Value property. Invalid property value.

The combobox MatchRequired property is set to False.

Here's the basics of my code. I will be more than willing to email the
file. It's too large to post.


Code:
--------------------

Private Sub LoadRow()

txtTapeNumber.Text = ActiveCell.Value
txtCode.Text = ActiveCell.Offset(0, 1)
cboChannel.Value = ActiveCell.Offset(0, 2) <--error here
cboBrand.Value = ActiveCell.Offset(0, 3)
cboFormat.Value = ActiveCell.Offset(0, 4)
cboLength.Value = ActiveCell.Offset(0, 5)
cboCategory.Value = ActiveCell.Offset(0, 6)
cboVersion.Value = ActiveCell.Offset(0, 7)
txtTapeTitle.Text = ActiveCell.Offset(0, 10)
txtKeywords.Text = ActiveCell.Offset(0, 11)
etc...(more txt boxes)

--------------------


Here is my next button code...


Code:
--------------------

Private Sub cmdNext_Click()

' Save form contents before changing rows:
SaveRow

' Increment row number:
If IsEmpty(ActiveCell) = False Then
ActiveCell.Offset(1, 0).Select
End If

' load info from sheet1 into userform
LoadRow

' Set focus to Name textbox:
txtTapeNumber.SetFocus

End Sub

--------------------


this is the last major piece of the puzzle to get this working. If I
want to add a new line, that's no problem, it's just on hitting
"Next".


Thanks for reading and for the help!


--
jbpyron
------------------------------------------------------------------------
jbpyron's Profile: http://www.excelforum.com/member.php...o&userid=33509
View this thread: http://www.excelforum.com/showthread...hreadid=533034



All times are GMT +1. The time now is 11:10 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com