Reference problem
I want to copy info from a textbox on a form to a specific cell in a word table on a word document, how is this done please?
is it something like
.cell(1,1).text = txt16.txt
.cell(2,1).text = txt17.txt
.cell(1,3).text = txt18.txt
????
but the above doesn't work!
[302 byte] By [
doubleudee] at [2007-11-20 11:07:40]

# 1 Re: Reference problem
On the first glimpse I'd say txt16.txt is surely not a valid reference to a TextBox. That's surely txt16.Text
If that is merely a typo here, you should provide a little more of the code.
Specially to which object the .cell belongs.
WoF at 2007-11-9 19:33:50 >

# 2 Re: Reference problem
Done the coding for this now thanks:-
With wrdDoc.Tables(1)
.Cell(2, 1).Range.Text = Text16(0).Text
.Cell(2, 2).Range.Text = Text16(1).Text
.Cell(2, 3).Range.Text = Text16(2).Text
end with
Another question though,
How would I merge cells(1,1) to cells(1,3) to make them one long cell that I can put a header text in?
# 3 Re: Reference problem
I'm not the Excel grandmaster, but I remember doing this in VBA for Excel like:
Range("a1:c1").Select 'mark the cells to combine
Selection.MergeCells = True 'combine them
Sorry, I'm not quite sure how to combine cells to a selection when you are adressing them as .Cell(1,1)...
WoF at 2007-11-9 19:35:55 >
