Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default How to paste a image into a VB UserFrame in Excel?

Hi,
Is there anybody out there who could help me with pasting a picture from
ClipBoard into a VB form in Excel? I use excel 2003.

The function for copying a range is working; I use:
Worksheets("data").Range("b1:d3").CopyPicture xlScreen, xlBitmap

I have a form defined, but whatever I try, I cant paste it into a form.

Anybody who could give me a hint?



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default How to paste a image into a VB UserFrame in Excel?

Worksheets("data").Range("b1:d3").CopyPicture xlScreen, xlBitmap
Range("K6").Select
ActiveSheet.Paste

"Gaia" wrote:

Hi,
Is there anybody out there who could help me with pasting a picture from
ClipBoard into a VB form in Excel? I use excel 2003.

The function for copying a range is working; I use:
Worksheets("data").Range("b1:d3").CopyPicture xlScreen, xlBitmap

I have a form defined, but whatever I try, I cant paste it into a form.

Anybody who could give me a hint?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default How to paste a image into a VB UserFrame in Excel?

Hi Joel,
Thanks for the quick replay.
But my problem is that I use shared Excel, hence I cant paste an image into
the sheet. Therefore I want to use a UserForm which I could paste the image
into.
So I use the statement €œWorksheets("data").Range("b1:d3").CopyPicture
xlScreen, xlBitmap€ to copy a area of the sheet as a bitmap into clipboard,
and then I want to paste it into a userform. It is that pasting which does
not work. I have tried for hours; search the net, but without any success.

Your proposal works very well if my workbook is not shared.

BR,
Gaia


"Joel" wrote:

Worksheets("data").Range("b1:d3").CopyPicture xlScreen, xlBitmap
Range("K6").Select
ActiveSheet.Paste

"Gaia" wrote:

Hi,
Is there anybody out there who could help me with pasting a picture from
ClipBoard into a VB form in Excel? I use excel 2003.

The function for copying a range is working; I use:
Worksheets("data").Range("b1:d3").CopyPicture xlScreen, xlBitmap

I have a form defined, but whatever I try, I cant paste it into a form.

Anybody who could give me a hint?



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default How to paste a image into a VB UserFrame in Excel?

I'm not sure what type of userform you are using. If userform is a worksheet
shouldn't you be able to select the worksheet like a worksheet by using
sheets("Sheets").acitvate

If it is a VBA userform then where are you pasting the picture in the
userform. Inside some sort of box?

"Gaia" wrote:

Hi Joel,
Thanks for the quick replay.
But my problem is that I use shared Excel, hence I cant paste an image into
the sheet. Therefore I want to use a UserForm which I could paste the image
into.
So I use the statement €œWorksheets("data").Range("b1:d3").CopyPicture
xlScreen, xlBitmap€ to copy a area of the sheet as a bitmap into clipboard,
and then I want to paste it into a userform. It is that pasting which does
not work. I have tried for hours; search the net, but without any success.

Your proposal works very well if my workbook is not shared.

BR,
Gaia


"Joel" wrote:

Worksheets("data").Range("b1:d3").CopyPicture xlScreen, xlBitmap
Range("K6").Select
ActiveSheet.Paste

"Gaia" wrote:

Hi,
Is there anybody out there who could help me with pasting a picture from
ClipBoard into a VB form in Excel? I use excel 2003.

The function for copying a range is working; I use:
Worksheets("data").Range("b1:d3").CopyPicture xlScreen, xlBitmap

I have a form defined, but whatever I try, I cant paste it into a form.

Anybody who could give me a hint?



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default How to paste a image into a VB UserFrame in Excel?

Hi again,
Yes, I am using a VB UserForm.
Here is the code that works:

Worksheets("persons_on_programs").Range(test_addre ss).CopyPicture xlScreen,
xlBitmap €˜( This statement works)

Here is an example on how I have tried to paste the bitmap picture created
above into the user form.
Inside the userform I have a image control/frame or what I should call it.
Here is my code that does not work.

Vise_Bilde.Bilde.Paste

I have tried that statement and all thinkable variants of it, but nothing
works.

BR,
Gaia


"Joel" wrote:

I'm not sure what type of userform you are using. If userform is a worksheet
shouldn't you be able to select the worksheet like a worksheet by using
sheets("Sheets").acitvate

If it is a VBA userform then where are you pasting the picture in the
userform. Inside some sort of box?

"Gaia" wrote:

Hi Joel,
Thanks for the quick replay.
But my problem is that I use shared Excel, hence I cant paste an image into
the sheet. Therefore I want to use a UserForm which I could paste the image
into.
So I use the statement €œWorksheets("data").Range("b1:d3").CopyPicture
xlScreen, xlBitmap€ to copy a area of the sheet as a bitmap into clipboard,
and then I want to paste it into a userform. It is that pasting which does
not work. I have tried for hours; search the net, but without any success.

Your proposal works very well if my workbook is not shared.

BR,
Gaia


"Joel" wrote:

Worksheets("data").Range("b1:d3").CopyPicture xlScreen, xlBitmap
Range("K6").Select
ActiveSheet.Paste

"Gaia" wrote:

Hi,
Is there anybody out there who could help me with pasting a picture from
ClipBoard into a VB form in Excel? I use excel 2003.

The function for copying a range is working; I use:
Worksheets("data").Range("b1:d3").CopyPicture xlScreen, xlBitmap

I have a form defined, but whatever I try, I cant paste it into a form.

Anybody who could give me a hint?





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default How to paste a image into a VB UserFrame in Excel?

I'm almost there. I think you have to create a file, then load the file as a
picture. To save the file you need to create a container and then save the
container as a gif file. To make the container create a chart then clear the
chart and then paste the picture. You can then save the chart.

I haven't found a better way than this. My problem is a can't get the
picture to display after I paste it.


Sheets("GIFcontainer").Activate
Charts.Add
ActiveChart.ChartType = xlColumnClustered
ActiveChart.SetSourceData Source:=Worksheets(1).Range("A1")
ActiveChart.Location Whe=xlLocationAsObject, _
Name:="GIFcontainer"
ActiveChart.ChartArea.ClearContents
Set containerbok = ActiveWorkbook
Set Container = ActiveChart

Worksheets("data").Range("b1:d3").CopyPicture Format:=xlBitmap
Container.Paste
Container.Export Filename:="c:\temp\pict.gif"
UserForm1.Image1.Picture = LoadPicture("c:\temp\pict.gif")

"Gaia" wrote:

Hi again,
Yes, I am using a VB UserForm.
Here is the code that works:

Worksheets("persons_on_programs").Range(test_addre ss).CopyPicture xlScreen,
xlBitmap €˜( This statement works)

Here is an example on how I have tried to paste the bitmap picture created
above into the user form.
Inside the userform I have a image control/frame or what I should call it.
Here is my code that does not work.

Vise_Bilde.Bilde.Paste

I have tried that statement and all thinkable variants of it, but nothing
works.

BR,
Gaia


"Joel" wrote:

I'm not sure what type of userform you are using. If userform is a worksheet
shouldn't you be able to select the worksheet like a worksheet by using
sheets("Sheets").acitvate

If it is a VBA userform then where are you pasting the picture in the
userform. Inside some sort of box?

"Gaia" wrote:

Hi Joel,
Thanks for the quick replay.
But my problem is that I use shared Excel, hence I cant paste an image into
the sheet. Therefore I want to use a UserForm which I could paste the image
into.
So I use the statement €œWorksheets("data").Range("b1:d3").CopyPicture
xlScreen, xlBitmap€ to copy a area of the sheet as a bitmap into clipboard,
and then I want to paste it into a userform. It is that pasting which does
not work. I have tried for hours; search the net, but without any success.

Your proposal works very well if my workbook is not shared.

BR,
Gaia


"Joel" wrote:

Worksheets("data").Range("b1:d3").CopyPicture xlScreen, xlBitmap
Range("K6").Select
ActiveSheet.Paste

"Gaia" wrote:

Hi,
Is there anybody out there who could help me with pasting a picture from
ClipBoard into a VB form in Excel? I use excel 2003.

The function for copying a range is working; I use:
Worksheets("data").Range("b1:d3").CopyPicture xlScreen, xlBitmap

I have a form defined, but whatever I try, I cant paste it into a form.

Anybody who could give me a hint?



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
Copy and paste an image Bill Excel Discussion (Misc queries) 3 May 6th 10 12:29 PM
Is there any way to search image of my local drive with Image name or Image Title, Description [email protected] Excel Programming 3 August 3rd 07 01:44 PM
How do I get a clear image when I paste a .pdf into excel MKLeisure Excel Discussion (Misc queries) 2 July 23rd 07 08:32 PM
PASTE LINK option not available when I select PASTE SPECIAL to link an image in Excel to a Word document. tln Links and Linking in Excel 0 April 22nd 07 04:28 PM
How to paste a image (signature) in a cell in Excel? V.Jeyakumar Excel Worksheet Functions 1 June 30th 06 09:15 AM


All times are GMT +1. The time now is 04:38 PM.

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"