![]() |
Userform question
Hi all
Is there a way to have all data appear like an image on userform I am trying to do the print preview but it keeps stalling the program. Any ideas would be great Thanks Greg |
Userform question
This bit of code copies a picture of the data to a blank chart and then
exports the chart as a gif (Create a graph and delete all of the objects to get the blank chart) Sub ExportChart() Application.ScreenUpdating = False 'Clear the chart contents Worksheets("Sheet1").Activate ActiveSheet.ChartObjects("Chart 1").Activate ActiveChart.Shapes.SelectAll Selection.Delete 'Copy the data to as a picture to the chart Range("A1:H29").Select Selection.CopyPicture ActiveSheet.ChartObjects("Chart 1").Activate ActiveChart.ChartArea.Select ActiveChart.Pictures.Paste.Select 'export the chart Fname = ThisWorkbook.Path & Application.PathSeparator & "temp.gif" ActiveSheet.ChartObjects(1).Chart.Export Filename:=Fname, _ FilterName:="GIF" End Sub This is the code for the userform, which contains a picture frame and a cancel/close button Private Sub UserForm_Initialize() Fname = ThisWorkbook.Path & Application.PathSeparator & "temp.gif" Image1.Picture = LoadPicture(Fname) End Sub Private Sub CloseButton_Click() Kill ThisWorkbook.Path & Application.PathSeparator & "temp.gif" Unload Me End Sub To be honest, it really bogs down the computer so I stopped using it. Though my computer is a few years old so on a newer faster system with more memory it may work better. PC "Greg" wrote in message ... Hi all Is there a way to have all data appear like an image on userform I am trying to do the print preview but it keeps stalling the program. Any ideas would be great Thanks Greg |
Userform question
Hi greg
Use an Excel5 Dialogsheet instead of a userform. Use the camera tool to create a picture of a range and cut-paste that picture onto a Dialog. This is a live picture that changes live with the worksteet. You can later redefine the picture range in the formula field or by code. HTH. Best wishes Harald "Greg" skrev i melding ... Hi all Is there a way to have all data appear like an image on userform I am trying to do the print preview but it keeps stalling the program. Any ideas would be great Thanks Greg |
All times are GMT +1. The time now is 03:49 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com