Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
insert picture to a specfic range of cells | Excel Discussion (Misc queries) | |||
Editing a simple macro | Excel Worksheet Functions | |||
Position Picture with macro | Setting up and Configuration of Excel | |||
Closing File Error | Excel Discussion (Misc queries) | |||
Playing a macro from another workbook | Excel Discussion (Misc queries) |