PDA

View Full Version : Solved: text in autoshape not refreshing



jazznaura
01-27-2008, 12:34 PM
hi all,

hope someone can help me with this.

the attached spreadsheet show the layout of a warehouse with a hidden autoshape which when the button on the right is pressed should show details of the stock in that location.
now, it seems to work but, every now and then it fails to refresh the details.

pressing the autoshape will run the macro to hide it.
excuse the basic coding i'm still learning.

could someone please have a look.

thanks jazz naura

Sub detailshow()
Application.ScreenUpdating = False
ActiveCell.Select
myref = Selection.Value
Sheets("data").Range("z1").Value = myref
sel = Sheets("data").Range("z1").Value
tpnd = Sheets("data").Range("ab1").Value
dec = Sheets("data").Range("ac1").Value
mcode = Sheets("data").Range("aa1").Value
cube = Sheets("data").Range("ag1").Value
stat = Sheets("data").Range("ad1").Value
av = Sheets("data").Range("ae1").Value
dem = Sheets("data").Range("af1").Value
Sheets("layout").Shapes("shaped").Visible = True
Sheets("layout").Shapes("shaped").Select
Selection.Characters.Text = ("Location: ") & (sel) & Chr(10) & ("Tpnd: ") & (tpnd) & Chr(10) & ("Description: ") & (dec) & Chr(10) & ("Mer Code: ") & (mcode) & Chr(10) & ("Cube: ") & (cube) & Chr(10) & ("Avaliable: ") & (av) & Chr(10) & ("Demand: ") & (dem) & Chr(10) & ("Status: ") & (stat)
With Selection.Characters(Start:=0, Length:=500).Font
.Name = "Arial"
.FontStyle = "bold"
.Size = 60
.ColorIndex = 1
End With
Application.ScreenUpdating = True
End Sub


Sub detailshide()
Application.ScreenUpdating = False
Sheets("layout").Shapes("shaped").Select
Selection.Characters.Text = ""
Sheets("layout").Shapes("shaped").Visible = False
Application.ScreenUpdating = True
End Sub

jazznaura
01-28-2008, 10:19 AM
so it looks like autoshapes can only handle/refresh 5 or so lines of data at a time.

so have simply split data into 2 autoshapes.