LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default save data , images and hyperlink between two workbooks

I have two file Order Confirmation.xls and Order Summary.xls
After fill-up the Order Confirmation sheet, click button (macro) will
add the data into Order Summary in last row. My problem is I don't know
how to add the image name and create a hyperlink to order confirmation
sheet in order summary (image & file column).
the purpose to keep the images is I want to view order summary,
the certain range of cell will display the image and I also can click
on hyperlink file to open the order confirmation file.I'll have a lot
of order confirmation file.

below is my macro
please help and give me some advice

Sub sketchOC()
Dim x As Variant
Dim picname
x = Application.GetOpenFilename("Pictures (*.jpg;*.bmp;*.gif),
*.jpg;*.bmp", , "Select Picture")
If x = False Then Exit Sub 'no file selected
Set mypic = ActiveSheet.Pictures.Insert(x)
With mypic
..Name = Range("AJ3")
..Left = Range("Az9").Left
..Top = Range("Az9").Top
..Height = 220
..Width = 200

End With
End Sub


Sub addto()
Dim WS_OrderConfirm As Worksheet
Dim WS_OrderSummary As Worksheet
Dim LastRow
Dim L As Long
Dim Pics As Shape
Dim shp As Shape

Workbooks.Open Filename:= _
"C:\Documents and Settings\default\Desktop\Order Summary.xls"

Set WS_OrderConfirm = Workbooks("order
confirmation.xls").Worksheets("Order Confirmations (2)")
Set WS_OrderSummaryPICS = Workbooks("Order
Summary").Worksheets("PICS")
Set WS_OrderSummary = Workbooks("Order Summary").Worksheets("Order
Summary")

WS_OrderSummary.Activate
LastRow = Application.CountA(ActiveSheet.Range("B:B")) + 1 'Find
last cell/row plus one
Cells(LastRow, 2).Value = WS_OrderConfirm.Range("$AJ$3").Value


WS_OrderConfirm.Activate
ActiveSheet.mypic.Select
Selection.Copy

WS_OrderSummaryPICS.Activate
ActiveSheet.Paste
Selection.Name = "abc"

End Sub

Attachment filename: desktop.zip
Download attachment: http://www.excelforum.com/attachment.php?postid=392274
---
Message posted from http://www.ExcelForum.com/

 
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
images with a hyperlink, data may have been lost Costas Kalfakis Excel Discussion (Misc queries) 0 January 10th 07 08:09 AM
How do I extract and save hyperlinks from images in excel Robert in Brisbane Excel Discussion (Misc queries) 4 December 29th 06 12:55 PM
hyperlink cells between workbooks Clark Excel Worksheet Functions 1 May 27th 06 11:03 PM
How do I un-embed images in Excel and save them to another folder. marcusgrimm Excel Discussion (Misc queries) 1 June 23rd 05 11:46 PM
hyperlink images in batch form The Fuzz Excel Worksheet Functions 1 November 13th 04 03:19 PM


All times are GMT +1. The time now is 10:28 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"