Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On a hidden worksheet I have a range of cells containing the Assumptions
utilized throughout the rest of the workbook. Using Excel's camera tool, I have taken a "picture" of the range and placed it on the hidden worksheet as well. On the other, non-hidden worksheets, I would like to have a button that, when clicked, would display a small "pop-up" window containing the "picture". Is there a way in VBA that this can be done? Any help would be greatly appreciated. Thanks. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
On Sep 4, 9:32 pm, Bob wrote:
On a hidden worksheet I have a range of cells containing the Assumptions utilized throughout the rest of the workbook. Using Excel's camera tool, I have taken a "picture" of the range and placed it on the hidden worksheet as well. On the other, non-hidden worksheets, I would like to have a button that, when clicked, would display a small "pop-up" window containing the "picture". Is there a way in VBA that this can be done? Any help would be greatly appreciated. Thanks. Hi, There is no need of having a hidden worksheet. You record a macro while taking the picture of your range you will get the reference name of the picture taken... like "Picture 1" etc. Then you can easily set the property of this picture to visible =true or false at the click of button. Hope this helps. The sample code is as below. Sub Macro1() Range("C8:F16").Select Selection.Copy Range("D5").Select ActiveSheet.Pictures.Paste(Link:=True).Select Range("J11").Select ActiveSheet.Shapes("Picture 1").Select Application.CutCopyMode = False End Sub Sub macro2() 'Hide Picture ActiveSheet.Shapes("Picture 1").Visible = False End Sub Sub macro3() 'Make picture visible ActiveSheet.Shapes("Picture 1").Visible = True End Sub |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
As an option, you can also use a single macro as a toggle:
Public Sub TogglePicture1() With ActiveSheet.Shapes("Picture 1") .Visible = Not .Visible End With End Sub In article . com, NC wrote: Sub macro2() 'Hide Picture ActiveSheet.Shapes("Picture 1").Visible = False End Sub Sub macro3() 'Make picture visible ActiveSheet.Shapes("Picture 1").Visible = True End Sub |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
NC,
Thanks for the suggestion and the accompanying code. I really appreciate it! Bob "NC" wrote: On Sep 4, 9:32 pm, Bob wrote: On a hidden worksheet I have a range of cells containing the Assumptions utilized throughout the rest of the workbook. Using Excel's camera tool, I have taken a "picture" of the range and placed it on the hidden worksheet as well. On the other, non-hidden worksheets, I would like to have a button that, when clicked, would display a small "pop-up" window containing the "picture". Is there a way in VBA that this can be done? Any help would be greatly appreciated. Thanks. Hi, There is no need of having a hidden worksheet. You record a macro while taking the picture of your range you will get the reference name of the picture taken... like "Picture 1" etc. Then you can easily set the property of this picture to visible =true or false at the click of button. Hope this helps. The sample code is as below. Sub Macro1() Range("C8:F16").Select Selection.Copy Range("D5").Select ActiveSheet.Pictures.Paste(Link:=True).Select Range("J11").Select ActiveSheet.Shapes("Picture 1").Select Application.CutCopyMode = False End Sub Sub macro2() 'Hide Picture ActiveSheet.Shapes("Picture 1").Visible = False End Sub Sub macro3() 'Make picture visible ActiveSheet.Shapes("Picture 1").Visible = True End Sub |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
JE,
Thanks for the code modification. I really appreciate it! Bob "JE McGimpsey" wrote: As an option, you can also use a single macro as a toggle: Public Sub TogglePicture1() With ActiveSheet.Shapes("Picture 1") .Visible = Not .Visible End With End Sub In article . com, NC wrote: Sub macro2() 'Hide Picture ActiveSheet.Shapes("Picture 1").Visible = False End Sub Sub macro3() 'Make picture visible ActiveSheet.Shapes("Picture 1").Visible = True End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Camera Icon and picture updates automatical as information changes | Excel Discussion (Misc queries) | |||
Picture Disappear in MS Excel | Excel Worksheet Functions | |||
insert picture excel 2007 from scanner or camera | Excel Worksheet Functions | |||
How to Display the The Insert Picture from Scanner or Camera dialog box | Excel Programming | |||
Inserting Picture from Camera | Excel Programming |