YasserKhalil
Well-Known Member
Hello everyone
In my sample I put a code that hide a shape .. I run this code at first to hide the shape created for this purpose
.. then I need to run the sub "Generate_Test_Data" ..it is supposed to display the shape during the code running then to hide it but it didn't
May you fix it for me?
In my sample I put a code that hide a shape .. I run this code at first to hide the shape created for this purpose
.. then I need to run the sub "Generate_Test_Data" ..it is supposed to display the shape during the code running then to hide it but it didn't
May you fix it for me?
Code:
Sub Hide_Display_Message()
Application.ScreenUpdating = True
With Sheet1.Shapes("Rectangle 1")
.Visible = msoTrue = (Not Sheet1.Shapes("Rectangle 1").Visible)
End With
End Sub
Sub Generate_Test_Data()
Dim Data(1 To 100000, 1 To 2)
Dim I As Long
Run "Hide_Display_Message"
Application.ScreenUpdating = False
Rnd -5
For I = 1 To UBound(Data)
If Rnd >= 0.5 Then Cells(I, 1) = "X"
If Rnd >= 0.5 Then Cells(I, 2) = "Y"
Next I
Application.ScreenUpdating = True
End Sub