8 replies
by senftk
I don't have a great answer for this one. Here is a link to some possible solutions using macros or VB.
http://www.experts-exchange.com/Applications/Q_21126612.html
by kennethaj
by rewrite
You will need to create a macro and then link a button to the macro. Try this code for the macro:
Sub Link()
ActiveWorkbook.FollowHyperlink Address:= _
"http://www.google.com/", NewWindow:= _
False, AddHistory:=True
Application.WindowState = xlNormal
End Sub
Then create a button in the spreadsheet and link it to that macro. This should open a new window with the url specified (change www.google.com to your desired url).
Cheers.
RW
by kennethaj
Poster rated this answer.
by kennethaj
by mcspamlist
Set your Print Area and then...
'Save as nonstandard htm to c:\
Application.Goto Reference:="Print_Area"
With ActiveWorkbook.PublishObjects.Add(xlSourcePrintArea, _
"C:\index.htm", "Sheet1", "", _
xlHtmlStatic, "Testing Macro_17302", "")
.Publish (True)
.AutoRepublish = False
End With
' ADD below body tag to open links in new windows
'open your file to get what is on the file in text form
Open "C:\index.htm" For Input As #1
'open your output file as a different file
Open "C:\Hello1.html" For Output As #2
'read information into a string variable to see the original
'loop the input
Do Until EOF(1)
Line Input #1, strInfo
intPosition = InStr(1, strInfo, "", vbTextCompare)
If intPosition <> 0 Then
strNewInfo = strNewInfo & strInfo & "" & Chr(13)
Else
strNewInfo = strNewInfo & Chr(13) & strInfo
End If
Loop
'close the original document
Close #1
'output the information to the new file
Print #2, strNewInfo
'close the new file
Close #2
'replace the old file with the new file
FileCopy "C:\Hello1.html", "C:\index.htm"
'delete the new, maintain the original
Kill "C:\Hello1.html"
by kennethaj
Poster rated this answer.
by kennethaj
This discussion is closed to new replies.
Trending Software posts
Sort by Trending