VBA: read Excel workbook from Word VBA and insert cell contents into user form.
Posted on 2006-04-06
ive got a user form written in Word VBA that requires user input and then fills out a word document. What i would like to be able to do is open an excel work book and take the contents of the first cell and enter it into a textbox. Based upon whats in the first cell there will be a corresponding address. The address will be broken into street and city-state-zip which will go into a second and third text box.
I would also like to be able to write to the excel workbook in the event that the contact is new and not in the workbook. A1 being the name, B1 is the street address, C1 is the city state and zip, D1 might be some other info, etc… I can have an if then statement with a check box in the user form if I know the contact is going to be new.
I have already set up the object libraries in word vba for excel and has a decent understanding of VB. Thank you in advance for any help.