Hi.
I'm using the following bit of code to act according to what shape name is currently selected.
Sub MySub()
Dim sh As Shape
On Error Resume Next
Set sh = ActiveWindow.Selection.ShapeRange(1)
If Not sh Is Nothing Then
If sh.Name = "Picture" Then
Call...
I have a whole load of little subs in a modules.... eg
Sub WM1()
On Error Goto ErrorHandler
my code
Exit Sub
ErrorHandler:
MsgBox "Error"
End Sub.
What I was wondering is if it is possible to have a single ErrorHandler that encompases the whole module?
Hi.
I'm getting a little confused. Should I be able to run a Sub using a variable.
i.e.
Sub SomeThing()
Call SomethingElse("etc", "MYSUB")
End Sub
Function SomethingElse(str1 As String, str2 As String)
some code = str1
str2
End Function
Hope that sort of makes sense but the str2 is...
I'm having no problem nameing a shape with the following
With ActiveWindow.Selection.ShapeRange
.Name = myName
End With
But I was wondering if it is possible to delete the name (not the shape) and have powerpoint rename it using it's own convention?
If, for example i'm writing the following code:-
Dim EG1 as Boolean
Dim EG2 as Boolean
Dim EG3 as Boolean
EG1 = ToggleButton1.Value
EG2 = ToggleButton2.Value
EG3 = ToggleButton3.Value
But i've got EG's going up to EG30..... do I need to put each and everyone of them, or is there a quick way...
Hi. I'm trying to create a graph in powerpoint with VBA which will then apply the format required. A basic version below:-
Sub GraphTest()
Dim oShape As PowerPoint.Shape
Dim oGraphChart As Graph.Application
Set oShape = ActiveWindow.Selection.SlideRange.Shapes.AddOLEObject _...
I was wondering if it was possible to embed an image in the userform that isn't initally seen by the user, untill a certain button is pressed, and a new button is created with thee image in it?
Many thanks again for this combo.
I have to admit i've not worked with collections before, but I can make sense of the above, so i'm going to apply it to a couple of other ideas i've had.
have a star
Many thanks for this combo. this is very helpful indeed.
There's just one thing, which I can't solve with this.... if a user presses one of the toggles so it's value is true, then presses that same toggle to switch it back to false, all the other toggles change to true.
Many thanks
Thom
Hi. I'm creating a form with 10 toggle buttons on it forming a grid, and i'm trying to set it up so that if one is depressed, all the others are raised, and so on with each button.
Assuming there were only 2 buttons, i'd use the code below
Private Sub ToggleButton1_Click()
If...
I'm trying to write a bit of code that does something different if the object selected in PP is with ppSelectionNone, ppSelectionShapes or ppSelectionText. But i was wondering what the ppSelection for just a plain line is, as opposed to a box.
Many thanks
Thom
Thanks Greg.
I managed it to do in the end. In the code i got powerpoint to create the shape and fill then cut it, and use the pasteface function to create the icon image. Seemed a bit long winded but seems to do the trick...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.