Exel

  sms 10:20 06 Feb 2007
Locked

Vog showed me how to move picture using vb code. How can I add to the code so that I can have more numbers and therfore more positions for the picture. I have tried to alter the code you gave me but i get error- must be doing it wrong
Thanks

  VoG II 10:32 06 Feb 2007

Previous thread click here

Try adapting this

Sub Worksheet_Change(ByVal Target As Range)
If Target.Count > 1 Then Exit Sub
If Target.Address(False, False) <> "A1" Then Exit Sub
With ActiveSheet.DrawingObjects("Picture 1")
Select Case Target.Value
Case Is < 10:
.Left = 10
.Top = 10
Case 10 To 29:
.Left = 200
.Top = 100
Case 30 To 49:
.Left = 250
.Top = 150
Case Is >= 50:
.Left = 300
.Top = 200
End Select
End With
End Sub

  sms 10:57 06 Feb 2007

Vog
Thanks for the advice, much appreciated

This thread is now locked and can not be replied to.

Elsewhere on IDG sites

Fujitsu Lifebook P727 laptop review

Converse's new logo: the trainer brand looks to its heritage for a fresh identity

Mac power user tips and hidden tricks

Comment lancer Windows 10 en mode sans ├ęchec ?