Retrieving Dropdown/Option Button Values

  • Thread starter Thread starter entonne
  • Start date Start date
E

entonne

I have a whole slew of excel files that contain data that I want t
compile into a single excel sheet. I've been able to automaticall
grab the values in each file, but am having a terrible time trying t
figure out how to grab the values of form controls. To be precise
few option buttons groups and drop down controls. I know you could d
a cell link then just get the value from there, but unfortunately th
designer didn't do that and I have over a hundred files. I'm prett
much lost. Is there any way to reference the value something like...

excelfile.worksheet.dropdown1.value

I've looked forever trying to find something, but I can't fin
anything. If anyone can point me in the right direction it would b
much appreciated.
Thank
 
for each drpdwn in Activesheet.Dropdowns
svaldrop = drpdwn.Value
' record the result
Next
for each obtn in Activesheet.OptionButtons
if obtn.Value = xlOn then
sValoption = oBtn.Caption
' record the result.
end if
Next
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top