How to Detect a Cell/Table in VBA 
Author Message
 How to Detect a Cell/Table in VBA

Hi All:

I am writing a VBA macro that needs to detect whether the
current position of the cursor lies in a cell/table or not.

I am using Word XP.

Thanks,
Rashid Hameed. (Annandale, NJ)



Mon, 05 Dec 2005 21:09:58 GMT  
 How to Detect a Cell/Table in VBA
Try this:

If Selection.Information(wdWithInTable) = True Then
    'do whatever
End If

Steve Lambert


Quote:
> Hi All:

> I am writing a VBA macro that needs to detect whether the
> current position of the cursor lies in a cell/table or not.

> I am using Word XP.

> Thanks,
> Rashid Hameed. (Annandale, NJ)



Mon, 05 Dec 2005 22:33:32 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Detect Excel's cell edit mode (F2 key) in VBA

2. To fill a cell in a Word table with VBA

3. Assigning Word Table Cell to VBA text box

4. How do I detect the existence of a table using VBA

5. dirty table - how to detect from vba?

6. Retaining styles in table cells when deleting table

7. Copy fields from record in table A to record in table B using VBA

8. Copy Record from Table 1 to Table 2 - Acc97 - VBA

9. Setting Excel cell formula via Access VBA

10. Changing Excel Cell Formats from Access97 VBA

11. Access VBA sets incorrect values to Excel Cells

12. Macro/VBA Code for changing the cell shade color

 

 
Powered by phpBB® Forum Software