• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Lookup row number in excel through Word VBA

Kieran Mort

New Member
I have two documents an excel spreadsheet which is a database of projects that have unique ID numbers and are not sorted.

The second document is a word document.

It is a form where people can type in the project ID number and it pulls information though from the excel spreadsheet via the use of ActiveX labels.

All works fine if I know the row number of the project I require and I put that into VBA for example. Cells(2,3)

Although I need the row index to be looked up so that it is not manually inserted.

X = (some sort of lookup based on the ActiveX text box where users type the project ID)

then I could use

cells(X,3) for all the labels.


any help would be great.
 
hmm... may not be of much help as I've never done this from Word and am not strong in VBA.... but Using the Row(VLOOKUP(________)) would be able to search for a given Proj ID and return the Row#.....

sorry as i'm sure that isnt helpful... I'm sure someone will be in here shortly with some awesome code/useful suggestions
 
Hi, Kieran Mort!

As a new user you might want (I'd say should and must) read this:
http://chandoo.org/forum/forums/new-users-please-start-here.14/

And regarding your issue, consider uploading a sample files (including manual examples of desired output if applicable), it'd be very useful for those who read this and might be able to help you, relieving the contributor of having to build a test file, if necessary. Thank you.

Regards!
 
Back
Top