Wow Dflac that looks like a lot of work, thank you for giving it a shot, I really appreciate it.
When I tried to use it I got :
"Function GetText() As String
Dim clipboard As MSForms.DataObject <-Compile Error: User-defined type not defined on Function
Dim strContents As String
Set clipboard = New MSForms.DataObject
clipboard.GetFromClipboard
GetText = clipboard.GetText
End Function"
I am not sure if I am using it right. In my original question I was trying to come up with a workaround for something I ran in to on another macro. You might know the answer and then this problem might be null.
I have a Summary Workbook that shows all of the Client Projects that that are being worked on. Each Client Project is a separate workbook. Each row of the Summary has a pasted link of a defined range from a different Client Project. There is a hyperlink to each Client Project that the user can click and go to the file to make updates.
I created a macro that:
- asks the user where the linked file is located
- it then creates a hyperlink to the file
- then it follows(clicks) the hyperlink and copies the defined range
- then pastes as a link into the summary workbook
It all works fine when I do the steps manually, and when I was actually recording the macro. But when I go to run the macro it runs into a problem. I have isolated it to excel following the hyperlink.
If I click on the cell that contains the hyperlink, then the warning about making sure the file is from a trustworhty source comes up, I hit ok, and the file opens.
I recorded a macro of clicking the Hyperlink, everything works as it should.I get this code:
When I run the macro, I get the warning about making sure the file is from a trustworhty source comes up, I hit ok, but then the hourglass comes up, excel pauses for a moment and then nothing happens.
This is what is driving me crazy, everything else work fine, and this one tiny little thing is messing it up.
The files are all located on our shared network drive. Im thinking either thats the reason or maybe its an excel setting. Do you have any ideas?
The full code with all the steps I have is below:
Bookmarks