mrbmike (TechnicalUser) Aug 17, 2006
I am converting a macro that was created in 1996 to current VBA.
Does any one know the VBA Syntax for this wordbasic statement?
WordBasic.NextCell
I have tried using this statement.
Selection.Move Unit:=wdCell, Count:=1
It works if the cell has already been created. When the Nextcell statement is used it performs the same function as the TAB key, which is great. It creates the cell and moves the cursor to that cell.There is a table where each row has 2 columns and the first row is updated numerically. I need the code to create the next cell in the next row and update it then create the 2nd cell in the row where the user will then type in there text.
Here is a copy of the 1996 code.
WordBasic.NextCell
WordBasic.InsertField Field:="SEQ stpxseq \n \* MERGEFORMAT"
WordBasic.NextCell
Here is where I am at now.
WordBasic.NextCell
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:="SEQ stpxseq \n", _
PreserveFormatting:=True
WordBasic.NextCell
Any suggestions would be greatly appreciated,
Thanks
I am converting a macro that was created in 1996 to current VBA.
Does any one know the VBA Syntax for this wordbasic statement?
WordBasic.NextCell
I have tried using this statement.
Selection.Move Unit:=wdCell, Count:=1
It works if the cell has already been created. When the Nextcell statement is used it performs the same function as the TAB key, which is great. It creates the cell and moves the cursor to that cell.There is a table where each row has 2 columns and the first row is updated numerically. I need the code to create the next cell in the next row and update it then create the 2nd cell in the row where the user will then type in there text.
Here is a copy of the 1996 code.
WordBasic.NextCell
WordBasic.InsertField Field:="SEQ stpxseq \n \* MERGEFORMAT"
WordBasic.NextCell
Here is where I am at now.
WordBasic.NextCell
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:="SEQ stpxseq \n", _
PreserveFormatting:=True
WordBasic.NextCell
Any suggestions would be greatly appreciated,
Thanks