If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Excel > Indirect drop down lists

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-26-04, 11:38
bailee220 bailee220 is offline
Registered User
 
Join Date: Oct 2003
Posts: 29
Red face Indirect drop down lists

I have gotten my drop down lists to work through vba. I now need a drop down list that is dependant on what was chosen from the first drop down list. I know you use the =INDIRECT(A1) when setting this up manually. I've tried to do this same thing through vba. But I seem to get an error. This is what I have in my vba code:

With Range("A:A").Validation
.Delete
.Add xlValidateList, xlValidAlertStop, xlBetween, "=Catalog"
.InCellDropdown = True
.ErrorMessage = "You must chose from the list of possible choices."
End With

With Range("B:B").Validation
.Delete
.Add xlValidateList, xlValidAlertStop, xlBetween, "=INDIRECT(A1)"
.InCellDropdown = True
.ErrorMessage = "You must chose from the list of possible choices."
End With

Does anyone have any thoughts. It' bombs out on the second with range (b:b) on the .add xlvalidatelist, xlValidAlertStop, xlBetween, "=INDIRECT(A1). And I'm not sure why.

Thanks in advance
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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