Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
images with a hyperlink, data may have been lost | Excel Discussion (Misc queries) | |||
How do I extract and save hyperlinks from images in excel | Excel Discussion (Misc queries) | |||
hyperlink cells between workbooks | Excel Worksheet Functions | |||
How do I un-embed images in Excel and save them to another folder. | Excel Discussion (Misc queries) | |||
hyperlink images in batch form | Excel Worksheet Functions |