|
-
Jun 22nd, 2006, 08:42 AM
#1
Thread Starter
Hyperactive Member
[Resolved]Combobox/Style Issue
Ok so I have an array of comboboxes set to DropDown List, so nobody can enter other data. Now I have cmd button to clear the form of all data. Since you can't write/clear the data in DropDown List style, I am switching the style of each to DropDown Combo first then clearing the data and returning the style back to DropDown List. Here's the code:
VB Code:
For i = 0 To 8
Set cboFlash(i).Style = 0
Next
For i = 0 To 8
cboFlash(i).Text = ""
Next
For i = 0 To 8
Set cboFlash(i).Style = 2
Next
Now I have two errors:
1. Compile Error: Invalid use of property - in regards to the .Style when I use the Set command.
2. Compile Error: Can't assign to read-only property - when i remove Set command.
Any suggestions?
Last edited by Falconsbane; Jun 22nd, 2006 at 08:51 AM.
-
Jun 22nd, 2006, 08:44 AM
#2
Re: Combobox/Style Issue
what's wrong with just doing or do you mean you want to make the selection blank and not change the dropdown choices - if so, do:
VB Code:
cboFlash(i).ListIndex = -1
-
Jun 22nd, 2006, 08:45 AM
#3
Re: Combobox/Style Issue
just use the listindex
VB Code:
cboFlash(i).ListIndex = -1

EDIT: too slow
JPnyc rocks!! (Just ask him!)
If u have your answer please go to the thread tools and click "Mark Thread Resolved"
-
Jun 22nd, 2006, 08:48 AM
#4
Thread Starter
Hyperactive Member
Re: Combobox/Style Issue
Thanks Guys, don't know what I was thinking, but that works wonderfully.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|