I need to get data from cell A1 from an excel file to a word file from which i'll be using a macro.
Suppose if i'm using a form ( in Word ) with a text box & a command button..I need the entries of A1 to be displayed in the text box
Printable View
I need to get data from cell A1 from an excel file to a word file from which i'll be using a macro.
Suppose if i'm using a form ( in Word ) with a text box & a command button..I need the entries of A1 to be displayed in the text box
see the tutorial, in the FAQ thread at the top of this forum, on automation of office applications
as you give little information, it is hard to help
if workbook is already open, you can try like
vb Code:
textbox1 = getobject(fullpath\workbookname).sheets("sheet1").range("a1")
if it is not already open, you would need to create an object instance of excel, open the workbook, read the range value, close workbook and quit excel