LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Runtime Error 381 - Invalid Property Array

Hello All,

{Excel 2007, PC, novice}

I have a userform which contains a ComboBox showing the bound column
data.
It supplies two Text boxes with data from the two columns not shown.


----'Text Box Values will reflect Credit Card Choice

Private Sub cmb_Purch_CreditCard_Change()
txt_Purch_SecCode = Me.cmb_Purch_CreditCard.Column(1)
txt_Purch_CodeLoc = Me.cmb_Purch_CreditCard.Column(2)
End Sub

======================================

The ComboBox Enabled property is set to False ,and the row source is
set to a range on a lookup sheet - only to be activated when the user
chooses the Credit Card method of payment. This allows Credit Card
related info to be visible and data to be entered into other text
boxes.

----'Activate Credit Card ComboBox

Private Sub cmb_PaymentMethod_Change()

If cmb_PaymentMethod.Value = "CC" Then
cmb_Purch_CreditCard.Enabled = True
cmb_Purch_CreditCard.BackColor = &H80000005

Else: cmb_Purch_CreditCard.Enabled = False
cmb_Purch_CreditCard.BackColor = &H8000000B
End If
End Sub

===================================

Adding the data to the spreadsheet works fine (relevant code shown):.


----'Payment Methods
..Cells(lRow, 24).Value = Me.cmb_PaymentMethod.Value
..Cells(lRow, 25).Value = Me.cmb_Purch_CreditCard.Value
..Cells(lRow, 26).Value = Me.txt_Purch_SecCode.Value
..Cells(lRow, 27).Value = Me.txt_Purch_CCExpire.Value

================================================

When I run a Command button to ‘Clear Form’ but not close the form, I
receive a ‘Runtime error 381’ Could not get the column property.
Invalid property array.’ The button and the code are located on/in
the user form, not in a module


Rather than flowing through this code in the Sub for ‘Clear
Form’ (relevant code shown):

---'Clear Payment Methods
cmb_PaymentMethod.Value = ""
cmb_Purch_CreditCard.Value = ""
txt_Purch_CCExpire.Value = ""
txt_Discounts.Value = ""
txt_Notes.Value = ""

The code jumps out and goes to the second line of the other Sub
routine:


---'Text Box Values will reflect Credit Card Choice

Private Sub cmb_Purch_CreditCard_Change()
txt_Purch_SecCode = Me.cmb_Purch_CreditCard.Column(1)
txt_Purch_CodeLoc = Me.cmb_Purch_CreditCard.Column(2)
End Sub



Does this need to be in the module for intializing the form?

I'm learning this as I go along, but I’m at a loss trying to figure
this one out.

Any ideas?
Thanks!

Mark Mace
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Runtime error 380 - Could not set the list property. Invalid property value. [email protected] Excel Programming 3 February 27th 07 06:35 AM
Runtime Error 380 – Could not set the list property. Invalid property value BernzG[_16_] Excel Programming 2 August 21st 05 10:10 PM
Runtime error 380: Could not set the List property. invalid property value of listbox jasgrand Excel Programming 0 October 6th 04 09:28 PM
Runtime Error 381 Couldn't set list property, invalid array index Newbillian Excel Programming 2 June 17th 04 11:25 AM
Runtime Error 381 Couldn't set list property, invalid array index Newbillian Excel Programming 0 June 16th 04 11:28 PM


All times are GMT +1. The time now is 12:22 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"