Exel

  sms 10:20 06 Feb 07
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 07

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 07

Vog
Thanks for the advice, much appreciated

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

Intel Coffee Lake 8th-gen Core processors release date rumours

1995-2015: How technology has changed the world in 20 years

Framestore’s haunting post-WWII title sequence for new BBC series SS-GB

How to install MacOS Sierra on an older Mac: Get Sierra running on Macs & MacBooks from before 2009