HI,

Paste this macro in the sheet module :

Private Sub Worksheet_Change(ByVal Target As Range)
    If Target.Address <> "$A$1" Or Target.Count <> 1 Then Exit Sub
    With Sheets("Sheet1")
        .Shapes(1).Width = .[B1].Offset(, .[A1].Value - 1).Left
    End With
End Sub

Regards.

Daniel

-----Message d'origine-----
De : excel-macros@googlegroups.com [mailto:excel-macros@googlegroups.com] De
la part de Subodh
Envoyé : lundi 15 août 2011 00:56
À : MS EXCEL AND VBA MACROS
Objet : $$Excel-Macros$$ To get a graphic item of size equal to a cell entry

HI
I want to get the graphic item, in this case a line with the length equal to
the cell value.
Acutally I want in cell A1 a value ranging from 1 to 10 and depending on
this value, the length of the line should be in the range B1 to k1 ie. if
its 1 the line should be in cell b1, if 2 the b1 and c1 , if 3 then b1, c1
and d1 and so on Thanks for your support.

--
----------------------------------------------------------------------------
------
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links :
http://twitter.com/exceldailytip 2. Join our LinkedIN group @
http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com 5. Excel Tips and
Tricks at http://exceldailytip.blogspot.com
 
To post to this group, send email to excel-macros@googlegroups.com

<><><><><><><><><><><><><><><><><><><><><><>
Like our page on facebook , Just follow below link
http://www.facebook.com/discussexcel

-- 
----------------------------------------------------------------------------------
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 
To post to this group, send email to excel-macros@googlegroups.com

<><><><><><><><><><><><><><><><><><><><><><>
Like our page on facebook , Just follow below link
http://www.facebook.com/discussexcel

Reply via email to