PDA

View Full Version : [SOLVED:] Link embedded objects



jdurbin
08-23-2016, 09:10 AM
I am currently using Excel 2013. I created a spreadsheet to share with a few hiring managers so that they could review the individuals who have applied for a position that we have open. The spreadsheet has three sheets. On the first sheet is named candidates and I have the individuals name (FN, LN,), contact numbers, etc.. The second sheet is my data validation sources. The third sheet is where I have the resumes of the individuals. I embedded the resumes as objects on this page. There are 50+ embedded resumes on this page.

I have read some post where individuals had placed a code in to link or create a command button to an embedded document from one sheet to another but it only referred to linking one document. I need to create links\command buttons for each documents (resumes) that are embedded objects.

What I wanted to do was to create a cell next to each candidates name and create a command button (name it resume) to link the embedded resume\object on page three.

What code would I need to do to link the resumes\objects from sheet 3 (named resumes) to the command buttons on sheet 1 (named candidates)?

Thank you

mancubus
08-25-2016, 06:59 AM
upload your workbook as explained in my signature.

alter confidential data. we just need to see the sheet and data structure and the objects in your workbook.

jdurbin
08-25-2016, 09:21 AM
I have attached an example of the file. It is not in .xlsm. I understand I would need to save it in .xlsm to allow the macros to work. I have inserted a command button next to each individual. I would like to link the command button to the resume on each individual so that when you hit the button the resume of that individual opens so that the manager can review the resume.

I appreciate any help you can provide or any advice you can provide on how to make this work or changes that I can make to improve the process.

mancubus
08-25-2016, 03:14 PM
rename the objects as per candidate name

change Object 89 to John Doe
change Object 90 to Jahe Doe
change Object 91 to Jon Doe
...
...
...
...


insert button for each candidate
assign below macro to all these buttons



Sub Open_Word_Doc()

Dim ObjectName As String
Dim RowNum As Long

With Worksheets("candidates")
RowNum = .Buttons(Application.Caller).TopLeftCell.Row
ObjectName = .Range("C" & RowNum) & " " & .Range("D" & RowNum)
End With

Worksheets("resumes").OLEObjects(ObjectName).Activate

End Sub


see attached

jdurbin
08-26-2016, 06:47 AM
I cannot figure out how to rename the objects from "object 89" to "john doe". Also would this code work for PDF files as well? I noticed the beginning of the code says "Open Word Doc". Some resumes are imported as PDF files as well.

Please advise.

THANKS

mancubus
08-26-2016, 06:49 AM
select the object like selecting a cell.
object name will appear in the address bar just like selected cell's address.
type in new name here.

jdurbin
08-26-2016, 07:13 AM
I must have a setting wrong in my xlsm. I can change the name in the one that you attached here but on the one I have it will not save the name change.

mancubus
08-26-2016, 07:37 AM
any protection on sheet or book?

jdurbin
08-26-2016, 07:41 AM
Nothing different than what I attached for you to review.

jdurbin
08-26-2016, 07:51 AM
I solved the issue. Thanks for your help.

mancubus
08-26-2016, 11:41 AM
yes. same method applies to pdf files.