ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Error 94 (https://www.excelbanter.com/excel-programming/327582-error-94-a.html)

Jennifer

Error 94
 
This is the error I can't seem to fix
Null value?

Private Sub ShowValue(cbo As ComboBox)
If cbo.ListIndex = -1 Then Exit Sub
lblShow.Caption = cbo.Value
--
Though daily learning, I LOVE EXCEL!
Jennifer

Bob Phillips[_6_]

Error 94
 
Can you show all the code, how the combo is loaded etc.?

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Jennifer" wrote in message
...
This is the error I can't seem to fix
Null value?

Private Sub ShowValue(cbo As ComboBox)
If cbo.ListIndex = -1 Then Exit Sub
lblShow.Caption = cbo.Value
--
Though daily learning, I LOVE EXCEL!
Jennifer




Jennifer

Error 94
 
Thanks Bob,
I figured it out though. When I changed the boundcolumns in the properties
from 1 to 2 this error happened. Once I changed it back to 1 all was good. Do
you have any idea why this happened, it didn't seem to affect the other combo
box that I switched. Just the ranch id cbo Thank you again. Jennifer

"Bob Phillips" wrote:

Can you show all the code, how the combo is loaded etc.?

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Jennifer" wrote in message
...
This is the error I can't seem to fix
Null value?

Private Sub ShowValue(cbo As ComboBox)
If cbo.ListIndex = -1 Then Exit Sub
lblShow.Caption = cbo.Value
--
Though daily learning, I LOVE EXCEL!
Jennifer





Tom Ogilvy

Error 94
 
If you have a single column combobox, then designating the boundcolumn as 2
would refer to a column that doesn't exist. What would be the intent of
designating column 2 if it is single column?

Boundcolumn = 0 returns listindex as the value of the combobox
Boundcolumn = 1 returns the selected row of column 1 as the value of the
combobox
and so forth.

Why would it work on other comboboxes - you may actually have more than one
column.

--
Regards,
Tom Ogilvy


"Jennifer" wrote in message
...
Thanks Bob,
I figured it out though. When I changed the boundcolumns in the

properties
from 1 to 2 this error happened. Once I changed it back to 1 all was good.

Do
you have any idea why this happened, it didn't seem to affect the other

combo
box that I switched. Just the ranch id cbo Thank you again. Jennifer

"Bob Phillips" wrote:

Can you show all the code, how the combo is loaded etc.?

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Jennifer" wrote in message
...
This is the error I can't seem to fix
Null value?

Private Sub ShowValue(cbo As ComboBox)
If cbo.ListIndex = -1 Then Exit Sub
lblShow.Caption = cbo.Value
--
Though daily learning, I LOVE EXCEL!
Jennifer








All times are GMT +1. The time now is 11:59 PM.

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