Thread: INDEX
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
mark mark is offline
external usenet poster
 
Posts: 5
Default INDEX

I am using Excel 97. I am wanting a userform to look at a
table on a worksheet and give the mileage result between
two locations.

The code I have used (which doesn't work) is:

Me.txtNONTAXABLE1 = Application.Index(Worksheets
("Mileage Chart").Range("b2:bd56"), Me.comboFrom1,
Me.comboTo1)

I've also tried:

Me.txtNONTAXABLE1 = Application.WorksheetFunction.Index
(Worksheets("Mileage Chart").Range("b2:bd56"),
Me.comboFrom1, Me.comboTo1)

So that the value of the textbox on the userform changes
if the combo boxes on the userform are changed.

Can anyone put me on the right track, please?

Thanks

Mark