Run-Time error 5824 - insufficient memory or disk space.

D

DaveW

I have a VB macro which converts text with a document extension to hyperlinks.
I keep getting the above run-Time error when I pass the text variable
through as a parameter. I have checked the parameter variable is being passed
through correctly. Can anybody give me clue to why this has started to
happen in Office2007?
a snippet from the code below the second Selection.Hyper...statemement
works the first causes the error:-

If LinkType = "H" Then
Selection.Hyperlinks.Add Anchor:=Selection.Range,
Address:=FileString, TextToDisplay:=FileString
Selection.Hyperlinks.Add Anchor:=Selection.Range,
Address:="c:\thisworks.txt", TextToDisplay:="thisworks"
 
N

Nimrod

Hi,
You need to write it like this:

Selection.Hyperlinks.Add Anchor:=Selection.Range, Address:="" & FileString
& "", TextToDisplay:="" & FileString & ""
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top