Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 07-07-2014, 11:37 PM
JohnWilson JohnWilson is offline How to set table's Name properties. (Powerpoint 2010 VBA) Windows 7 64bit How to set table's Name properties. (Powerpoint 2010 VBA) Office 2010 32bit
Programmer
 
Join Date: Nov 2008
Location: UK
Posts: 1,914
JohnWilson has a spectacular aura aboutJohnWilson has a spectacular aura about
Default

Pretty much the same

Dim myDocument As Slide
Set myDocument = ActivePresentation.Slides(1)
With myDocument.Shapes.addTable(NumRows:=3, NumColumns:=4, Left:=10, Top:=50)
.Name = "Red Square"
End With

However I hate myDocument being used to refer to a slide (I know it comes from Microsoft help but it's wrong - slides are not documents)

Sub addTable()
Dim mySlide As Slide
Dim myTable As Shape
Set mySlide = ActivePresentation.Slides(1)
Set myTable = mySlide.Shapes.addTable(NumRows:=3, NumColumns:=4, Left:=10, Top:=50)
myTable.Name = "Red Square"
End Sub

You will find it difficult to use hotkeys in PPT BTW.
__________________
Microsoft PowerPoint MVP 2007-2023
Free Advanced PowerPoint Tips and Tutorials

Last edited by JohnWilson; 07-08-2014 at 12:54 AM.
Reply With Quote
 

Tags
give name, vba



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to set table's Name properties. (Powerpoint 2010 VBA) Updating Document Properties without using advanced properties dialogue thedr9wningman Word VBA 3 01-20-2014 05:56 PM
How to set table's Name properties. (Powerpoint 2010 VBA) How 2 Save Table Properties & Apply to other table Popeye.Tom Word Tables 1 04-24-2013 09:44 PM
Document properties opens everytime I open a powerpoint nyrangers1994 PowerPoint 0 01-08-2013 07:10 AM
Excel VBA: Control Word Table and Set its properties tinfanide Excel Programming 0 12-10-2011 09:06 AM
How to set table's Name properties. (Powerpoint 2010 VBA) Excel table properties pmblom Excel 4 07-03-2011 02:00 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 12:17 PM.


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