pptSam
01-20-2011, 04:53 AM
Hello Everybody
I have a problem running a ppt-application, programmed in ppt 2010 on a pc with office 2007 (including ppt) installed. Both Systems run on Vista.
The application runs fine on the 2010 version but has very confusing errors, when running it on the 2007 version.
That's what I wanted the vba-code to do:
When I click on a shape, the shape should change the border weight and color to appear "activated". All this, while running ppt in presentation-mode.
That's what happens:
When I click the shape, nothing happens on the screen. When I quit the presentation-mode by esc, I find, that the border has changed. When I start the presentation-mode again, the changes are displayed. But the changes are not as intended: while the border weight is correct, the colour is not (it appears black instead of red).
So, this are the problems I am facing:
1. The changes to a shape are not displayed (slide not "refreshed")
2. The change of the colour is wrong (black not red as programmed)
Here is the code I am using to mark the shape:
Remark: The original code is more complex, but my testing showed, that the other parts are running without problems. The variables PsglKlickVar and PsglPerf are public variables that originate from other modules.
Public Sub SetBorder(oshp As Shape)
Set Pshp = oshp
If PsglKlickVar = 1 Then
If PsglPerf = 1 Then
With Pshp.Line
.ForeColor.RGB = RGB(255, 0, 0) 'colour red
.Visible = msoTrue
.Weight = 4.5
End With
Else
With Pshp.Line
.ForeColor.RGB = RGB(0, 255, 0) 'colour green
.Visible = msoTrue
.Weight = 4.5
End With
End If
End If
End Sub
:think: I already wondered if all this has anything to do with the vba references but didn't get the answer...
I have a problem running a ppt-application, programmed in ppt 2010 on a pc with office 2007 (including ppt) installed. Both Systems run on Vista.
The application runs fine on the 2010 version but has very confusing errors, when running it on the 2007 version.
That's what I wanted the vba-code to do:
When I click on a shape, the shape should change the border weight and color to appear "activated". All this, while running ppt in presentation-mode.
That's what happens:
When I click the shape, nothing happens on the screen. When I quit the presentation-mode by esc, I find, that the border has changed. When I start the presentation-mode again, the changes are displayed. But the changes are not as intended: while the border weight is correct, the colour is not (it appears black instead of red).
So, this are the problems I am facing:
1. The changes to a shape are not displayed (slide not "refreshed")
2. The change of the colour is wrong (black not red as programmed)
Here is the code I am using to mark the shape:
Remark: The original code is more complex, but my testing showed, that the other parts are running without problems. The variables PsglKlickVar and PsglPerf are public variables that originate from other modules.
Public Sub SetBorder(oshp As Shape)
Set Pshp = oshp
If PsglKlickVar = 1 Then
If PsglPerf = 1 Then
With Pshp.Line
.ForeColor.RGB = RGB(255, 0, 0) 'colour red
.Visible = msoTrue
.Weight = 4.5
End With
Else
With Pshp.Line
.ForeColor.RGB = RGB(0, 255, 0) 'colour green
.Visible = msoTrue
.Weight = 4.5
End With
End If
End If
End Sub
:think: I already wondered if all this has anything to do with the vba references but didn't get the answer...