Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi all, In Path "C:\My Documents\Pictures\" I have four pictures with
the name "My Pic 1.bmp" to "My Pic 4.bmp" I got "Image control" and two command buttons with the caption "Next" and "Previous" on my worksheet. I need two macros assigned to both buttons "Next" and "Previous". I want macro to display picture in image control from path "C\My Documents\Pictures\" when i click button "Next" and macro should display next picture every time when i click button "Next". I assume you might have gussed from my question that what kind of macro i need for button "Previous". Yes i need macro to display pictures backword like 4,3,2,1 when i click button "Previous". Both macro should stop doing any thing when last picture is displayed like in button "Next" case it will be "My Pic 4.bmp" and in button "Previous" case it will be "My Pic 1.bmp". I will be greateful if any friend can help me. I tried macro below but its not working sub ChangePic () Dim i as Integer i = i + 1 Me.Image1.Picture = LoadPicture(""C\My Documents\Pictures\My Pic " & i & ".bmp") End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
frame control inside an image control | Excel Programming | |||
Programatically control picture property of Image control | Excel Programming | |||
Image control DC | Excel Programming | |||
Displaying a Tif image in the Image Control | Excel Programming | |||
copy shape image into image control | Excel Programming |