Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I use this code to test colors, etc. in a workbook which is for testing
purposes only. Sub TestShp() Dim MyDocument Set MyDocument = Worksheets(2) MyDocument.Shapes.AddShape msoShape32pointStar, 250, 250, 100, 200 MyDocument.Shapes(1).Fill.ForeColor.RGB = RGB(255, 100, 100) Set newWordArt = MyDocument.Shapes.AddTextEffect(PresetTextEffect:= msoTextEffect1, Text:="Test", fontName:="Arial Black", fontSize:=36, FontBold:=msoFalse, FontItalic:=msoFalse, Left:=10, Top:=10) Counter = 0 Do With MyDocument.Shapes(1) .IncrementLeft Counter + 70 .IncrementTop (Counter * -1) + (-50) .IncrementRotation 30 End With Counter = Counter + 25 WaitTime Loop While Counter < 100 Worksheets(2).Shapes(2).Delete Worksheets(2).Shapes(1).Delete End Sub The mystery is this. The msoShape suddenly quit appearing while the WordArt TextEffect worked just fine. Part two of the mystery is that it only occurs in this workbook. I can copy this code to any other workbook and it works fine. Can this be attributed to a corrupted file or is there some other code that I might have run that would have turned off the msoShape visible properties. I have checked all of the code in the module and cannot find anything that sets the visible properties to false. Does anyone have a clue? This was previously posted without the code and no one responded. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Waittime just raises an error for me.
since you delete the shapes at the bottom, perhaps it just creates them and deletes them. -- Regards, Tom Ogilvy "JLGWhiz" wrote: I use this code to test colors, etc. in a workbook which is for testing purposes only. Sub TestShp() Dim MyDocument Set MyDocument = Worksheets(2) MyDocument.Shapes.AddShape msoShape32pointStar, 250, 250, 100, 200 MyDocument.Shapes(1).Fill.ForeColor.RGB = RGB(255, 100, 100) Set newWordArt = MyDocument.Shapes.AddTextEffect(PresetTextEffect:= msoTextEffect1, Text:="Test", fontName:="Arial Black", fontSize:=36, FontBold:=msoFalse, FontItalic:=msoFalse, Left:=10, Top:=10) Counter = 0 Do With MyDocument.Shapes(1) .IncrementLeft Counter + 70 .IncrementTop (Counter * -1) + (-50) .IncrementRotation 30 End With Counter = Counter + 25 WaitTime Loop While Counter < 100 Worksheets(2).Shapes(2).Delete Worksheets(2).Shapes(1).Delete End Sub The mystery is this. The msoShape suddenly quit appearing while the WordArt TextEffect worked just fine. Part two of the mystery is that it only occurs in this workbook. I can copy this code to any other workbook and it works fine. Can this be attributed to a corrupted file or is there some other code that I might have run that would have turned off the msoShape visible properties. I have checked all of the code in the module and cannot find anything that sets the visible properties to false. Does anyone have a clue? This was previously posted without the code and no one responded. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sorry bout that Tom. The WaitTime is a function that creates a delay
interval so that the Shape image will display long enough for visual effect. You can take that out and put a message box in its place to halt the macro long enough to look at it. You should see the image on your screen. I can see it in any other workbook but that particular one and it is only the msoShape that does it. That is why the anomaly is so mystifying. If none of the shapes images showed, I could probably find a reason, but when only one type of shape image does it, I don't even know where to start looking. Are there any technical people that I could report this to that might have a clue? "Tom Ogilvy" wrote: Waittime just raises an error for me. since you delete the shapes at the bottom, perhaps it just creates them and deletes them. -- Regards, Tom Ogilvy "JLGWhiz" wrote: I use this code to test colors, etc. in a workbook which is for testing purposes only. Sub TestShp() Dim MyDocument Set MyDocument = Worksheets(2) MyDocument.Shapes.AddShape msoShape32pointStar, 250, 250, 100, 200 MyDocument.Shapes(1).Fill.ForeColor.RGB = RGB(255, 100, 100) Set newWordArt = MyDocument.Shapes.AddTextEffect(PresetTextEffect:= msoTextEffect1, Text:="Test", fontName:="Arial Black", fontSize:=36, FontBold:=msoFalse, FontItalic:=msoFalse, Left:=10, Top:=10) Counter = 0 Do With MyDocument.Shapes(1) .IncrementLeft Counter + 70 .IncrementTop (Counter * -1) + (-50) .IncrementRotation 30 End With Counter = Counter + 25 WaitTime Loop While Counter < 100 Worksheets(2).Shapes(2).Delete Worksheets(2).Shapes(1).Delete End Sub The mystery is this. The msoShape suddenly quit appearing while the WordArt TextEffect worked just fine. Part two of the mystery is that it only occurs in this workbook. I can copy this code to any other workbook and it works fine. Can this be attributed to a corrupted file or is there some other code that I might have run that would have turned off the msoShape visible properties. I have checked all of the code in the module and cannot find anything that sets the visible properties to false. Does anyone have a clue? This was previously posted without the code and no one responded. |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I couldn't see anything until I did this:
Sub TestShp() Dim MyDocument Set MyDocument = Worksheets(2) MyDocument.Shapes.AddShape msoShape32pointStar, 250, 250, 100, 200 MyDocument.Shapes(1).Fill.ForeColor.RGB = RGB(255, 100, 100) Set newWordArt = MyDocument.Shapes.AddTextEffect(PresetTextEffect:= msoTextEffect1, Text:="Test", FontName:="Arial Black", FontSize:=36, FontBold:=msoFalse, FontItalic:=msoFalse, Left:=10, Top:=10) ' Exit Sub Counter = 0 Do DoEvents With MyDocument.Shapes(1) .IncrementLeft Counter + 70 .IncrementTop (Counter * -1) + (-50) .IncrementRotation 30 End With Application.ScreenUpdating = False Application.ScreenUpdating = True DoEvents Counter = Counter + 25 i = 0 Do While i < 1000000 i = i + 1 Loop Loop While Counter < 100 Worksheets(2).Shapes(2).Delete Worksheets(2).Shapes(1).Delete End Sub -- Regards, Tom Ogilvy "JLGWhiz" wrote: Sorry bout that Tom. The WaitTime is a function that creates a delay interval so that the Shape image will display long enough for visual effect. You can take that out and put a message box in its place to halt the macro long enough to look at it. You should see the image on your screen. I can see it in any other workbook but that particular one and it is only the msoShape that does it. That is why the anomaly is so mystifying. If none of the shapes images showed, I could probably find a reason, but when only one type of shape image does it, I don't even know where to start looking. Are there any technical people that I could report this to that might have a clue? "Tom Ogilvy" wrote: Waittime just raises an error for me. since you delete the shapes at the bottom, perhaps it just creates them and deletes them. -- Regards, Tom Ogilvy "JLGWhiz" wrote: I use this code to test colors, etc. in a workbook which is for testing purposes only. Sub TestShp() Dim MyDocument Set MyDocument = Worksheets(2) MyDocument.Shapes.AddShape msoShape32pointStar, 250, 250, 100, 200 MyDocument.Shapes(1).Fill.ForeColor.RGB = RGB(255, 100, 100) Set newWordArt = MyDocument.Shapes.AddTextEffect(PresetTextEffect:= msoTextEffect1, Text:="Test", fontName:="Arial Black", fontSize:=36, FontBold:=msoFalse, FontItalic:=msoFalse, Left:=10, Top:=10) Counter = 0 Do With MyDocument.Shapes(1) .IncrementLeft Counter + 70 .IncrementTop (Counter * -1) + (-50) .IncrementRotation 30 End With Counter = Counter + 25 WaitTime Loop While Counter < 100 Worksheets(2).Shapes(2).Delete Worksheets(2).Shapes(1).Delete End Sub The mystery is this. The msoShape suddenly quit appearing while the WordArt TextEffect worked just fine. Part two of the mystery is that it only occurs in this workbook. I can copy this code to any other workbook and it works fine. Can this be attributed to a corrupted file or is there some other code that I might have run that would have turned off the msoShape visible properties. I have checked all of the code in the module and cannot find anything that sets the visible properties to false. Does anyone have a clue? This was previously posted without the code and no one responded. |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I ran the code you posted in that workbook and it does the same thing. I can
see the word "TEST" but the 32point star is not visible. It is there, but not visible. I can click on the area where it is supposed to be visible and the handles appear but no image. There must be a switch flipped somewhere that I can't find. Thanks for your time, Tom. This appears to be either a technical problem or operator error. "Tom Ogilvy" wrote: I couldn't see anything until I did this: Sub TestShp() Dim MyDocument Set MyDocument = Worksheets(2) MyDocument.Shapes.AddShape msoShape32pointStar, 250, 250, 100, 200 MyDocument.Shapes(1).Fill.ForeColor.RGB = RGB(255, 100, 100) Set newWordArt = MyDocument.Shapes.AddTextEffect(PresetTextEffect:= msoTextEffect1, Text:="Test", FontName:="Arial Black", FontSize:=36, FontBold:=msoFalse, FontItalic:=msoFalse, Left:=10, Top:=10) ' Exit Sub Counter = 0 Do DoEvents With MyDocument.Shapes(1) .IncrementLeft Counter + 70 .IncrementTop (Counter * -1) + (-50) .IncrementRotation 30 End With Application.ScreenUpdating = False Application.ScreenUpdating = True DoEvents Counter = Counter + 25 i = 0 Do While i < 1000000 i = i + 1 Loop Loop While Counter < 100 Worksheets(2).Shapes(2).Delete Worksheets(2).Shapes(1).Delete End Sub -- Regards, Tom Ogilvy "JLGWhiz" wrote: Sorry bout that Tom. The WaitTime is a function that creates a delay interval so that the Shape image will display long enough for visual effect. You can take that out and put a message box in its place to halt the macro long enough to look at it. You should see the image on your screen. I can see it in any other workbook but that particular one and it is only the msoShape that does it. That is why the anomaly is so mystifying. If none of the shapes images showed, I could probably find a reason, but when only one type of shape image does it, I don't even know where to start looking. Are there any technical people that I could report this to that might have a clue? "Tom Ogilvy" wrote: Waittime just raises an error for me. since you delete the shapes at the bottom, perhaps it just creates them and deletes them. -- Regards, Tom Ogilvy "JLGWhiz" wrote: I use this code to test colors, etc. in a workbook which is for testing purposes only. Sub TestShp() Dim MyDocument Set MyDocument = Worksheets(2) MyDocument.Shapes.AddShape msoShape32pointStar, 250, 250, 100, 200 MyDocument.Shapes(1).Fill.ForeColor.RGB = RGB(255, 100, 100) Set newWordArt = MyDocument.Shapes.AddTextEffect(PresetTextEffect:= msoTextEffect1, Text:="Test", fontName:="Arial Black", fontSize:=36, FontBold:=msoFalse, FontItalic:=msoFalse, Left:=10, Top:=10) Counter = 0 Do With MyDocument.Shapes(1) .IncrementLeft Counter + 70 .IncrementTop (Counter * -1) + (-50) .IncrementRotation 30 End With Counter = Counter + 25 WaitTime Loop While Counter < 100 Worksheets(2).Shapes(2).Delete Worksheets(2).Shapes(1).Delete End Sub The mystery is this. The msoShape suddenly quit appearing while the WordArt TextEffect worked just fine. Part two of the mystery is that it only occurs in this workbook. I can copy this code to any other workbook and it works fine. Can this be attributed to a corrupted file or is there some other code that I might have run that would have turned off the msoShape visible properties. I have checked all of the code in the module and cannot find anything that sets the visible properties to false. Does anyone have a clue? This was previously posted without the code and no one responded. |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
As long as the visible property is true, I don't think there is a switch
that is flipped. Excel just doesn't redraw very well -- Regards, Tom Ogilvy "JLGWhiz" wrote in message ... I ran the code you posted in that workbook and it does the same thing. I can see the word "TEST" but the 32point star is not visible. It is there, but not visible. I can click on the area where it is supposed to be visible and the handles appear but no image. There must be a switch flipped somewhere that I can't find. Thanks for your time, Tom. This appears to be either a technical problem or operator error. "Tom Ogilvy" wrote: I couldn't see anything until I did this: Sub TestShp() Dim MyDocument Set MyDocument = Worksheets(2) MyDocument.Shapes.AddShape msoShape32pointStar, 250, 250, 100, 200 MyDocument.Shapes(1).Fill.ForeColor.RGB = RGB(255, 100, 100) Set newWordArt = MyDocument.Shapes.AddTextEffect(PresetTextEffect:= msoTextEffect1, Text:="Test", FontName:="Arial Black", FontSize:=36, FontBold:=msoFalse, FontItalic:=msoFalse, Left:=10, Top:=10) ' Exit Sub Counter = 0 Do DoEvents With MyDocument.Shapes(1) .IncrementLeft Counter + 70 .IncrementTop (Counter * -1) + (-50) .IncrementRotation 30 End With Application.ScreenUpdating = False Application.ScreenUpdating = True DoEvents Counter = Counter + 25 i = 0 Do While i < 1000000 i = i + 1 Loop Loop While Counter < 100 Worksheets(2).Shapes(2).Delete Worksheets(2).Shapes(1).Delete End Sub -- Regards, Tom Ogilvy "JLGWhiz" wrote: Sorry bout that Tom. The WaitTime is a function that creates a delay interval so that the Shape image will display long enough for visual effect. You can take that out and put a message box in its place to halt the macro long enough to look at it. You should see the image on your screen. I can see it in any other workbook but that particular one and it is only the msoShape that does it. That is why the anomaly is so mystifying. If none of the shapes images showed, I could probably find a reason, but when only one type of shape image does it, I don't even know where to start looking. Are there any technical people that I could report this to that might have a clue? "Tom Ogilvy" wrote: Waittime just raises an error for me. since you delete the shapes at the bottom, perhaps it just creates them and deletes them. -- Regards, Tom Ogilvy "JLGWhiz" wrote: I use this code to test colors, etc. in a workbook which is for testing purposes only. Sub TestShp() Dim MyDocument Set MyDocument = Worksheets(2) MyDocument.Shapes.AddShape msoShape32pointStar, 250, 250, 100, 200 MyDocument.Shapes(1).Fill.ForeColor.RGB = RGB(255, 100, 100) Set newWordArt = MyDocument.Shapes.AddTextEffect(PresetTextEffect:= msoTextEffect1, Text:="Test", fontName:="Arial Black", fontSize:=36, FontBold:=msoFalse, FontItalic:=msoFalse, Left:=10, Top:=10) Counter = 0 Do With MyDocument.Shapes(1) .IncrementLeft Counter + 70 .IncrementTop (Counter * -1) + (-50) .IncrementRotation 30 End With Counter = Counter + 25 WaitTime Loop While Counter < 100 Worksheets(2).Shapes(2).Delete Worksheets(2).Shapes(1).Delete End Sub The mystery is this. The msoShape suddenly quit appearing while the WordArt TextEffect worked just fine. Part two of the mystery is that it only occurs in this workbook. I can copy this code to any other workbook and it works fine. Can this be attributed to a corrupted file or is there some other code that I might have run that would have turned off the msoShape visible properties. I have checked all of the code in the module and cannot find anything that sets the visible properties to false. Does anyone have a clue? This was previously posted without the code and no one responded. |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
One other thing about the msoShape. It is there, but not visible. The
selection frame appears with the node handles when you click in the location on the screen. "JLGWhiz" wrote: Sorry bout that Tom. The WaitTime is a function that creates a delay interval so that the Shape image will display long enough for visual effect. You can take that out and put a message box in its place to halt the macro long enough to look at it. You should see the image on your screen. I can see it in any other workbook but that particular one and it is only the msoShape that does it. That is why the anomaly is so mystifying. If none of the shapes images showed, I could probably find a reason, but when only one type of shape image does it, I don't even know where to start looking. Are there any technical people that I could report this to that might have a clue? "Tom Ogilvy" wrote: Waittime just raises an error for me. since you delete the shapes at the bottom, perhaps it just creates them and deletes them. -- Regards, Tom Ogilvy "JLGWhiz" wrote: I use this code to test colors, etc. in a workbook which is for testing purposes only. Sub TestShp() Dim MyDocument Set MyDocument = Worksheets(2) MyDocument.Shapes.AddShape msoShape32pointStar, 250, 250, 100, 200 MyDocument.Shapes(1).Fill.ForeColor.RGB = RGB(255, 100, 100) Set newWordArt = MyDocument.Shapes.AddTextEffect(PresetTextEffect:= msoTextEffect1, Text:="Test", fontName:="Arial Black", fontSize:=36, FontBold:=msoFalse, FontItalic:=msoFalse, Left:=10, Top:=10) Counter = 0 Do With MyDocument.Shapes(1) .IncrementLeft Counter + 70 .IncrementTop (Counter * -1) + (-50) .IncrementRotation 30 End With Counter = Counter + 25 WaitTime Loop While Counter < 100 Worksheets(2).Shapes(2).Delete Worksheets(2).Shapes(1).Delete End Sub The mystery is this. The msoShape suddenly quit appearing while the WordArt TextEffect worked just fine. Part two of the mystery is that it only occurs in this workbook. I can copy this code to any other workbook and it works fine. Can this be attributed to a corrupted file or is there some other code that I might have run that would have turned off the msoShape visible properties. I have checked all of the code in the module and cannot find anything that sets the visible properties to false. Does anyone have a clue? This was previously posted without the code and no one responded. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Disappearing Data | Excel Discussion (Misc queries) | |||
Disappearing Macros | Excel Discussion (Misc queries) | |||
Disappearing text | Excel Discussion (Misc queries) | |||
how do I keep a worksheet from disappearing? | Excel Discussion (Misc queries) | |||
Add-Ins Disappearing? | Excel Discussion (Misc queries) |