Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
WightRob
 
Posts: n/a
Default Macro to enlarge a picture


I have rows of records of Computer Aided Design (CAD) files with a
thumbnail picture in the first column. I would like to have a button
or a toggle in each row so that when a user selects this, the adjacent
picture expands. It would then shrink again on selection of a second
button or re-selection of the toggle. Can anyone help me with this?
Rob


--
WightRob
------------------------------------------------------------------------
WightRob's Profile: http://www.excelforum.com/member.php...o&userid=13799
View this thread: http://www.excelforum.com/showthread...hreadid=548638

  #2   Report Post  
Posted to microsoft.public.excel.misc
CLR
 
Posts: n/a
Default Macro to enlarge a picture

You might consider putting the pictures in the comment boxes instead of a
cell on the subject row. These comment boxes will automatically pop up to
whatever size you wish on mouse-over and drop back out of sight when the
mouse is moved off the cell..........works really cool.


Vaya con Dios,
Chuck, CABGx3




"WightRob" wrote:


I have rows of records of Computer Aided Design (CAD) files with a
thumbnail picture in the first column. I would like to have a button
or a toggle in each row so that when a user selects this, the adjacent
picture expands. It would then shrink again on selection of a second
button or re-selection of the toggle. Can anyone help me with this?
Rob


--
WightRob
------------------------------------------------------------------------
WightRob's Profile: http://www.excelforum.com/member.php...o&userid=13799
View this thread: http://www.excelforum.com/showthread...hreadid=548638


  #3   Report Post  
Posted to microsoft.public.excel.misc
WightRob
 
Posts: n/a
Default Macro to enlarge a picture


Thanks for the suggestion. I had thought of doing that but can't figure
out how to get the picture into the comment box. Copy and paste doesn't
seem to work. Can you let me know how to do it.
Thanks, Rob


--
WightRob
------------------------------------------------------------------------
WightRob's Profile: http://www.excelforum.com/member.php...o&userid=13799
View this thread: http://www.excelforum.com/showthread...hreadid=548638

  #4   Report Post  
Posted to microsoft.public.excel.misc
WightRob
 
Posts: n/a
Default Macro to enlarge a picture


I have found a partial solution. I have recorded 2 macros, one to
enlarge the picture and one to reduce it. I have assigned these macros
to buttons adjacent to the picture. The problem with this is that the
macro applies to a specific picture. To make this work, I would have
to record 2 macros for every picture. (I have a lot of records!). Does
anyone know how to make the macro apply to the picture next to the
button selected?


--
WightRob
------------------------------------------------------------------------
WightRob's Profile: http://www.excelforum.com/member.php...o&userid=13799
View this thread: http://www.excelforum.com/showthread...hreadid=548638

  #5   Report Post  
Posted to microsoft.public.excel.misc
CLR
 
Posts: n/a
Default Macro to enlarge a picture


Select the cell, Right-click InsertComment.........move the cursor to the
border of the Comment Box where it turns into a black cross and Left-click,
then left-click on the little arrow next to the FillBucket, then choose
FillEffects, then the PictureTab, then SelectPicture and choose a picture,
then OK, OK.........

Vaya con Dios,
Chuck, CABGx3


"WightRob" wrote:


Thanks for the suggestion. I had thought of doing that but can't figure
out how to get the picture into the comment box. Copy and paste doesn't
seem to work. Can you let me know how to do it.
Thanks, Rob


--
WightRob
------------------------------------------------------------------------
WightRob's Profile: http://www.excelforum.com/member.php...o&userid=13799
View this thread: http://www.excelforum.com/showthread...hreadid=548638




  #6   Report Post  
Posted to microsoft.public.excel.misc
WightRob
 
Posts: n/a
Default Macro to enlarge a picture


Thanks CLR that works well. As you say, nice effect.:)


--
WightRob
------------------------------------------------------------------------
WightRob's Profile: http://www.excelforum.com/member.php...o&userid=13799
View this thread: http://www.excelforum.com/showthread...hreadid=548638

  #7   Report Post  
Posted to microsoft.public.excel.misc
CLR
 
Posts: n/a
Default Macro to enlarge a picture

You're welcome, happy to help.........as you say, Excel is not really a
"drawing tool" as such....but with a few tricks, one can produce some really
amazing results, and the conditional formatting can make things REALLY
interesting. Oh yeah, besides the "broken intersection" another neat
thing to make is the one where one line "jumps over" the other, with a little
arc. Come back again, we don't often get the opportunity to discuss the
drawing-characteristics of Excel here.

Vaya con Dios,
Chuck, CABGx3



"WightRob" wrote:


Thanks CLR that works well. As you say, nice effect.:)


--
WightRob
------------------------------------------------------------------------
WightRob's Profile: http://www.excelforum.com/member.php...o&userid=13799
View this thread: http://www.excelforum.com/showthread...hreadid=548638


  #8   Report Post  
Posted to microsoft.public.excel.misc
CLR
 
Posts: n/a
Default Macro to enlarge a picture

You're welcome, and here's a little code to Resize the CommentBox if you
wish........just type a number, say 50, in A1 and A2 and select the cell with
the CommentBox you want to resize, and then run this macro...

Sub ResizeCommentBox()
ActiveCell.Comment.Shape.Height = Range("a1").Value
ActiveCell.Comment.Shape.Width = Range("a2").Value
End Sub


Vaya con Dios,
Chuck, CABGx3


"WightRob" wrote:


Thanks CLR that works well. As you say, nice effect.:)


--
WightRob
------------------------------------------------------------------------
WightRob's Profile: http://www.excelforum.com/member.php...o&userid=13799
View this thread: http://www.excelforum.com/showthread...hreadid=548638


  #9   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default Macro to enlarge a picture

Even though you're happy with Chuck's solution, you could use buttons from the
Forms toolbar and have your code determine which picture to modify.

Option Explicit
Sub testme()

Dim myButton As Button
Dim myPict As Picture
Set myButton = ActiveSheet.Buttons(Application.Caller)
Set myPict = FindPicture(myButton, ActiveSheet)
If myPict Is Nothing Then
MsgBox "No picture on that button's row"
Else
'code to adjust picture
MsgBox myPict.Name
End If

End Sub


Function FindPicture(myBTN As Button, wks As Worksheet) As Picture

Dim myPict As Picture
Dim PictToAdj As Picture

With wks
Set PictToAdj = Nothing
For Each myPict In .Pictures
If Intersect(.Range(myPict.TopLeftCell, myPict.BottomRightCell), _
myBTN.TopLeftCell.EntireRow) Is Nothing Then
'keep looking
Else
Set PictToAdj = myPict
Exit For 'stop looking
End If
Next myPict
End With

Set FindPicture = PictToAdj

End Function


WightRob wrote:

I have found a partial solution. I have recorded 2 macros, one to
enlarge the picture and one to reduce it. I have assigned these macros
to buttons adjacent to the picture. The problem with this is that the
macro applies to a specific picture. To make this work, I would have
to record 2 macros for every picture. (I have a lot of records!). Does
anyone know how to make the macro apply to the picture next to the
button selected?

--
WightRob
------------------------------------------------------------------------
WightRob's Profile: http://www.excelforum.com/member.php...o&userid=13799
View this thread: http://www.excelforum.com/showthread...hreadid=548638


--

Dave Peterson
  #10   Report Post  
Posted to microsoft.public.excel.misc
CLR
 
Posts: n/a
Default Macro to enlarge a picture

Ha.......bet you're wondering what I was talking about here, huh.......it's
just my response to another post, got mixed up with this one, sorry.....

Vaya con Dios,
Chuck, CABGx3



"CLR" wrote:

You're welcome, happy to help.........as you say, Excel is not really a
"drawing tool" as such....but with a few tricks, one can produce some really
amazing results, and the conditional formatting can make things REALLY
interesting. Oh yeah, besides the "broken intersection" another neat
thing to make is the one where one line "jumps over" the other, with a little
arc. Come back again, we don't often get the opportunity to discuss the
drawing-characteristics of Excel here.

Vaya con Dios,
Chuck, CABGx3



"WightRob" wrote:


Thanks CLR that works well. As you say, nice effect.:)


--
WightRob
------------------------------------------------------------------------
WightRob's Profile: http://www.excelforum.com/member.php...o&userid=13799
View this thread: http://www.excelforum.com/showthread...hreadid=548638




  #11   Report Post  
Posted to microsoft.public.excel.misc
WightRob
 
Posts: n/a
Default Macro to enlarge a picture


OK guys.

Thanks to CLR for your suggestion, I was a bit confused with your
further comments but interested so I may follow up the other thread you
were responding too.

Thanks also to Dave Peterson for your suggestion, I haven't had time to
check it out yet but I will. :)

This thread had become a little confusing so I think I'll close it now
and start a new one if I need further help.

Rob


--
WightRob
------------------------------------------------------------------------
WightRob's Profile: http://www.excelforum.com/member.php...o&userid=13799
View this thread: http://www.excelforum.com/showthread...hreadid=548638

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
insert picture to a specfic range of cells CORY Excel Discussion (Misc queries) 8 February 3rd 06 05:50 PM
Editing a simple macro Connie Martin Excel Worksheet Functions 5 November 29th 05 09:19 PM
Position Picture with macro G Setting up and Configuration of Excel 1 November 28th 05 07:25 PM
Closing File Error jcliquidtension Excel Discussion (Misc queries) 4 October 20th 05 12:22 PM
Playing a macro from another workbook Jim Excel Discussion (Misc queries) 1 February 23rd 05 10:12 PM


All times are GMT +1. The time now is 12:54 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"