Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 10-07-2013, 06:28 AM
norwood norwood is offline moving around a table Windows Vista moving around a table Office 2000
Novice
moving around a table
 
Join Date: Sep 2013
Posts: 23
norwood is on a distinguished road
Default moving around a table

Is there a way to move to a specific cell in a table ?



For example, I need to move to the centre cell in a table. Currently, I use the Selection.MoveDown, MoveRight ect... commands. But, I need to keep track of my move counts.

Is there a way move to a cell designation (A1, B1 etc...) for example ?

Thanks !
Reply With Quote
  #2  
Old 10-07-2013, 08:51 AM
slaycock slaycock is offline moving around a table Windows 7 64bit moving around a table Office 2013
Expert
 
Join Date: Sep 2013
Posts: 256
slaycock is on a distinguished road
Default

You can use

selection.Tables(1).cells(x,y) to select a cell.

You need to be careful if the table contains merged or split cells because the maximum X and Y are based on the maximum number of rows and columns.

This aspect of tables in word macros is a real PITA.
Reply With Quote
  #3  
Old 10-07-2013, 09:26 AM
norwood norwood is offline moving around a table Windows Vista moving around a table Office 2000
Novice
moving around a table
 
Join Date: Sep 2013
Posts: 23
norwood is on a distinguished road
Default

Great, Thanks !
Reply With Quote
  #4  
Old 10-07-2013, 08:01 PM
fumei fumei is offline moving around a table Windows 7 64bit moving around a table Office XP
Expert
 
Join Date: Jan 2013
Posts: 440
fumei is on a distinguished road
Default

It also depends on how often you need to do this. If it is something you regularly need to do with a specific table cell, then you could simply declare that cell as an object and then go to it with one instruction.

I could also add that it is very possible that you do not need to go to it at all. VBA makes it easy to action any given cell without ever putting the Selection there.
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
moving around a table Moving sum dmrj78 Excel 3 10-29-2012 12:34 PM
moving around a table moving one task from one row to another ketanco Project 3 12-26-2011 09:29 AM
Moving Messages iflog Outlook 2 08-19-2011 01:30 PM
moving around a table Moving formula range multiple cells when moving sum over one cell FraserKitchell Excel 4 02-26-2010 10:38 AM
moving around a table Table rows moving to new page when you don't want them to graham Word Tables 1 11-16-2009 08:51 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 11:04 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft