Auto size of picture/block arrow

  • Thread starter Thread starter Franck
  • Start date Start date
F

Franck

Hello,

I would like to automatically size a block arrow in Excel
2000 depending on the value I have in a given cell.
Then the arrow width will vary automatically depending on
the value of the cell.
Today I have to do manually via Format - Autoshape but as
I have many I would like to do it automatically

Thanks
Franck
 
You can use a Worksheet_Change event. For example, if the value is in
cell B5, the following code will change the width of the arrow:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count > 1 Then Exit Sub
If Target.Address = "$B$5" Then
ActiveSheet.Shapes("AutoShape 1") _
.Width = Target.Value * 5
End If
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top