ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Copying as Picture Link - using Macro (https://www.excelbanter.com/excel-discussion-misc-queries/33055-copying-picture-link-using-macro.html)

Kamal

Copying as Picture Link - using Macro
 
I am preparing a report using macro . I want to copy that one page report to
a new file as a picture link.

Can some one help me in writing a macro to copy - say range A1 : T50 - from
one file and paste it to a new file as picture link?

Thanks

Ron de Bruin

Try this Kamal

Dim wb As Workbook
Range("A1:T50").Copy
Set wb = Workbooks.Add(1)
wb.Sheets(1).Pictures.Paste(Link:=True).Select
Application.CutCopyMode = False


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Kamal" wrote in message ...
I am preparing a report using macro . I want to copy that one page report to
a new file as a picture link.

Can some one help me in writing a macro to copy - say range A1 : T50 - from
one file and paste it to a new file as picture link?

Thanks




Kamal

Ron,

It worked very well. Exactly the way I wanted.

Thanks a lot


"Ron de Bruin" wrote:

Try this Kamal

Dim wb As Workbook
Range("A1:T50").Copy
Set wb = Workbooks.Add(1)
wb.Sheets(1).Pictures.Paste(Link:=True).Select
Application.CutCopyMode = False


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Kamal" wrote in message ...
I am preparing a report using macro . I want to copy that one page report to
a new file as a picture link.

Can some one help me in writing a macro to copy - say range A1 : T50 - from
one file and paste it to a new file as picture link?

Thanks





JustinLabenne

Like this:

Option Explicit

Sub PastPicLink()
Range("A1:T50").Copy
ActiveSheet.Pictures.Paste(Link:=True).Select
Application.CutCopyMode = False
End Sub

I don't know what you mean by copying it to a new file, an Excel file?
Quote:

Originally Posted by Kamal
I am preparing a report using macro . I want to copy that one page report to
a new file as a picture link.

Can some one help me in writing a macro to copy - say range A1 : T50 - from
one file and paste it to a new file as picture link?

Thanks



All times are GMT +1. The time now is 01:58 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com