All:
Need assistance on macro code to do the following:
From a command button - copy a range from a worksheet (A1:D9), then save
selection as a bitmap (picture) on the desktop.
Thank you in advance.
|
|
0
|
|
|
|
Reply
|
Utf
|
1/8/2010 9:22:01 PM |
|
Hi,
Try this :
Modify sheet name and range address at your convenient.
'--------------------------------------------
Sub Save_Range_On_Desktop()
Application.ScreenUpdating = False
With Sheets("Sheet1")
.Activate
Workbooks.Add
.Range("A2:H31").CopyPicture
End With
With ActiveSheet
.Paste
With .ChartObjects.Add(0, 0, _
Selection.Width, Selection.Height).Chart
.Paste
.ChartArea.Border.LineStyle = 0
End With
With .ChartObjects(1)
.Top = 0
.Left = 0
.Chart.Export "C:\Users\DM\Desktop\Its_Name.bmp", "bmp"
End With
.Parent.Close False
End With
Application.ScreenUpdating = True
End Sub
'--------------------------------------------
"Maze" <Maze@discussions.microsoft.com> a écrit dans le message de groupe de discussion :
172D24F1-AEFF-48F7-8E9E-C9C5441318BC@microsoft.com...
All:
Need assistance on macro code to do the following:
From a command button - copy a range from a worksheet (A1:D9), then save
selection as a bitmap (picture) on the desktop.
Thank you in advance.
|
|
0
|
|
|
|
Reply
|
michdenis
|
1/9/2010 12:37:32 AM
|
|
Thank you for responding - is there anything else I need to do, I keep
getting a Syntax error, starting on the first .Activate
"michdenis" wrote:
> Hi,
>
> Try this :
>
> Modify sheet name and range address at your convenient.
>
> '--------------------------------------------
> Sub Save_Range_On_Desktop()
>
> Application.ScreenUpdating = False
> With Sheets("Sheet1")
> .Activate
> Workbooks.Add
> .Range("A2:H31").CopyPicture
> End With
> With ActiveSheet
> .Paste
> With .ChartObjects.Add(0, 0, _
> Selection.Width, Selection.Height).Chart
> .Paste
> .ChartArea.Border.LineStyle = 0
> End With
> With .ChartObjects(1)
> .Top = 0
> .Left = 0
> .Chart.Export "C:\Users\DM\Desktop\Its_Name.bmp", "bmp"
> End With
> .Parent.Close False
> End With
> Application.ScreenUpdating = True
> End Sub
> '--------------------------------------------
>
> "Maze" <Maze@discussions.microsoft.com> a écrit dans le message de groupe de discussion :
> 172D24F1-AEFF-48F7-8E9E-C9C5441318BC@microsoft.com...
> All:
>
> Need assistance on macro code to do the following:
>
> From a command button - copy a range from a worksheet (A1:D9), then save
> selection as a bitmap (picture) on the desktop.
>
> Thank you in advance.
>
|
|
0
|
|
|
|
Reply
|
Utf
|
1/11/2010 6:21:02 PM
|
|
Danses pour le groupe avancé
|
|
0
|
|
|
|
Reply
|
michdenis
|
1/11/2010 6:50:04 PM
|
|
"Maze" <Maze@discussions.microsoft.com> a écrit dans le message de groupe de discussion :
B9964347-1FF3-4F78-BF1B-4537DE37E64B@microsoft.com...
Thank you for responding - is there anything else I need to do, I keep
getting a Syntax error, starting on the first .Activate
"michdenis" wrote:
> Hi,
>
> Try this :
>
> Modify sheet name and range address at your convenient.
>
> '--------------------------------------------
> Sub Save_Range_On_Desktop()
>
> Application.ScreenUpdating = False
> With Sheets("Sheet1")
> .Activate
> Workbooks.Add
> .Range("A2:H31").CopyPicture
> End With
> With ActiveSheet
> .Paste
> With .ChartObjects.Add(0, 0, _
> Selection.Width, Selection.Height).Chart
> .Paste
> .ChartArea.Border.LineStyle = 0
> End With
> With .ChartObjects(1)
> .Top = 0
> .Left = 0
> .Chart.Export "C:\Users\DM\Desktop\Its_Name.bmp", "bmp"
> End With
> .Parent.Close False
> End With
> Application.ScreenUpdating = True
> End Sub
> '--------------------------------------------
>
> "Maze" <Maze@discussions.microsoft.com> a écrit dans le message de groupe de discussion
> :
> 172D24F1-AEFF-48F7-8E9E-C9C5441318BC@microsoft.com...
> All:
>
> Need assistance on macro code to do the following:
>
> From a command button - copy a range from a worksheet (A1:D9), then save
> selection as a bitmap (picture) on the desktop.
>
> Thank you in advance.
>
|
|
0
|
|
|
|
Reply
|
michdenis
|
1/11/2010 6:51:40 PM
|
|
"Maze" <Maze@discussions.microsoft.com> a écrit dans le message de groupe de discussion :
B9964347-1FF3-4F78-BF1B-4537DE37E64B@microsoft.com...
Thank you for responding - is there anything else I need to do, I keep
getting a Syntax error, starting on the first .Activate
"michdenis" wrote:
> Hi,
>
> Try this :
>
> Modify sheet name and range address at your convenient.
>
> '--------------------------------------------
> Sub Save_Range_On_Desktop()
>
> Application.ScreenUpdating = False
> With Sheets("Sheet1")
> .Activate
> Workbooks.Add
> .Range("A2:H31").CopyPicture
> End With
> With ActiveSheet
> .Paste
> With .ChartObjects.Add(0, 0, _
> Selection.Width, Selection.Height).Chart
> .Paste
> .ChartArea.Border.LineStyle = 0
> End With
> With .ChartObjects(1)
> .Top = 0
> .Left = 0
> .Chart.Export "C:\Users\DM\Desktop\Its_Name.bmp", "bmp"
> End With
> .Parent.Close False
> End With
> Application.ScreenUpdating = True
> End Sub
> '--------------------------------------------
>
> "Maze" <Maze@discussions.microsoft.com> a écrit dans le message de groupe de discussion
> :
> 172D24F1-AEFF-48F7-8E9E-C9C5441318BC@microsoft.com...
> All:
>
> Need assistance on macro code to do the following:
>
> From a command button - copy a range from a worksheet (A1:D9), then save
> selection as a bitmap (picture) on the desktop.
>
> Thank you in advance.
>
|
|
0
|
|
|
|
Reply
|
michdenis
|
1/11/2010 6:51:52 PM
|
|
For prereceding version of excel 2007
Menu bar / tools / Macros or procedures / Security / approved editors /
you have to check the 2 checkboxes in the button of the window.
Excel 2007,
Office button / Options Excel / Confidentiality gestion center / Parameters /
Macro parameters / and you have to check the case : Approved access ... vba project
These informations have been translated from a french version...
sorry if the command name button have a different caption than those used.
"Maze" <Maze@discussions.microsoft.com> a écrit dans le message de groupe de discussion :
B9964347-1FF3-4F78-BF1B-4537DE37E64B@microsoft.com...
Thank you for responding - is there anything else I need to do, I keep
getting a Syntax error, starting on the first .Activate
"michdenis" wrote:
> Hi,
>
> Try this :
>
> Modify sheet name and range address at your convenient.
>
> '--------------------------------------------
> Sub Save_Range_On_Desktop()
>
> Application.ScreenUpdating = False
> With Sheets("Sheet1")
> .Activate
> Workbooks.Add
> .Range("A2:H31").CopyPicture
> End With
> With ActiveSheet
> .Paste
> With .ChartObjects.Add(0, 0, _
> Selection.Width, Selection.Height).Chart
> .Paste
> .ChartArea.Border.LineStyle = 0
> End With
> With .ChartObjects(1)
> .Top = 0
> .Left = 0
> .Chart.Export "C:\Users\DM\Desktop\Its_Name.bmp", "bmp"
> End With
> .Parent.Close False
> End With
> Application.ScreenUpdating = True
> End Sub
> '--------------------------------------------
>
> "Maze" <Maze@discussions.microsoft.com> a écrit dans le message de groupe de discussion
> :
> 172D24F1-AEFF-48F7-8E9E-C9C5441318BC@microsoft.com...
> All:
>
> Need assistance on macro code to do the following:
>
> From a command button - copy a range from a worksheet (A1:D9), then save
> selection as a bitmap (picture) on the desktop.
>
> Thank you in advance.
>
|
|
0
|
|
|
|
Reply
|
michdenis
|
1/11/2010 7:10:11 PM
|
|
|
6 Replies
275 Views
(page loaded in 0.107 seconds)
Similiar Articles: Save as bitmap - microsoft.public.excel.programmingAll: Need assistance on macro code to do the following: From a command button - copy a range from a worksheet (A1:D9), then save selection as a bitmap (picture) on ... Create and save embedded bitmap image - microsoft.public.access ...This may or may not help you but here's how I store and update user signatures in Access. The signature will have been pre-created in a bitmap editor. how to change bitmap pictures to jpeg in microsoft outlook 2003 ...how do you change bitmap pictures to jpeg in microsoft outlook 2003. when i try to save picture as it only save as type Bitmap [*.bmp] how can i cha... Visio 2007 - "Save as" PNG Format - 920 Error ...Visio 2007 - "Save as" PNG Format - 920 Error ..... as my vsd files are in, but now i'm trying to save on the desktop, and I'm setting ... to be saved as a bitmap format ... from RGB pixels to Bitmap file - microsoft.public.vc.mfc ...I can print them easily using bitblt function in CDC class, but I failed to save them properly into a bitmap file. I could not make the right bitmapheader and the ... How to save a picturebox's image to a .PNG file? (VB6 ...Hi all! I have a little program (written in VB6) that saves the image in a picturebox to a BMP file. The problem is that BMP files are several meg... Paste Special Bitmap Image Option - microsoft.public.word ...... paste the screen shots, using paste special, I get the following options 1) Bitmap ... Edit>Paste Special>Picture to get the image. ... by selecting one of Safari's Save ... How to save an 8-bit grayscale JPEG image? - microsoft.public ...Hi, I have a problem with saving JPEG images in 8-bit indexed pixel format. When I save a bitmap in any other format (gif, tiff, png, bmp) everythi... Acos trig function - microsoft.public.excel.programming ...Hi Philosophaie, If you are creating an User Defined Function where ACOS is ... Save as bitmap Utf 6 131 save OLE Object to a file - microsoft.public.access.modulesdaovba ...How to display OLE Object (e.g. Word Doc) on form, help, FAQ ... How to display OLE Object (e ... ... public.access.conversion How To Save Bitmap File as OLE Object in ... Internet Explorer saves images as bitmaps (.bmp Files)When you save an image in Microsoft Internet Explorer, the image is saved by default as a bitmap (.bmp). You do not have the option to save the image by ... Bitmap.Save Method (System.Drawing)Name Description; Save(String) Saves this Image to the specified file or stream. (Inherited from Image.) Save(Stream, ImageFormat) Saves this image to the specified ... How to Save as a BMP Only | eHow.comA bitmap image (BMP) provides you with a picture with detailed colors. The BMP file format is typically used in digital cameras, because you can view high-detailed ... How to Save a BMP As a JPG | eHow.comThere are plenty of programs one can purchase or download that will convert picture file formats. Fortunately, when changing a BMP (Bitmap) image to a JPG (Joint ... Saving a Drawing to a Bitmap File - CodeProjectA simple way to save a drawing to a bitmap file.; Author: Frank Ekpar; Updated: 19 Jan 2005; Section: General Graphics; Chapter: Multimedia; Updated: 19 Jan 2005 7/17/2012 6:18:13 PM
|