Excel validation problem

G

Guest

Hi! All;

I am using Excel to do a validation program. This program consisted by several worksheets and these worksheets will shared some data from a source worksheet. For example some worksheet has contains item is and item description column and all this data actually extract from source worksheet, so when click the item id from validation list and the corresponding item description will shown on the column. I created a code and try it on Excel 2000 & above, it works properly. However when I try to same code on Excel 97, the function doesn’t work due to when click the selection from the list, the item description didn’t show any thing. So any one know what the problem.

This is my source code.

Dim count, RowNumber, ColumnNumber As Variant

count = 2

RowNumber = Selection.Row
ColumnNumber = Selection.Column

Do While Sheet10.Cells(count, 1).Value <> ""
If Sheet10.Cells(count, 2).Value = Cells(RowNumber, 3).Value Then
Sheet10.Range("a" & count).Copy
Range("d" & RowNumber).PasteSpecial Paste:=xlValues
Application.CutCopyMode = False
Exit Sub
End If
count = count + 1
Loop

Regards
 
M

mudraker

Using Excel 97 I get an debug error on all references to sheet10

Sheet10 has not been setto relate to any worksheet

try
dim Sheet10 as worksheet

set sheet10 = sheets("sheet10")

or

set sheet10 = workbooks("name").sheets("sheet10")


or

change sheet10.
to
sheets("sheet10")
 

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

Similar Threads


Top