I am having trouble with a function which takes the data given to it and then opens a new window and displays the data. The function works while it is by itself, but when I add it to the Head of the HTML with the rest of the Sub's it throws up the error Variable is undefined.
The function is as follows:
Function WriteLinetoWin(data1)
Set OpenNewWin = Window.open("","NewWindow", "toolbar=yes,titlebar=yes,height=400,width= 700,resizable=yes,left=20,top=20"
OpenNewWin.document.write("<html><head><title>Test Data</title></head><body>"
OpenNewWin.document.write("<h3><p align=""center"">Test Data<br>"
OpenNewWin.document.write(Data1)
OpenNewWin.document.write("</body></html>"
End Function
Is there something I am overlooking?
Thanx
Medwyn
The function is as follows:
Function WriteLinetoWin(data1)
Set OpenNewWin = Window.open("","NewWindow", "toolbar=yes,titlebar=yes,height=400,width= 700,resizable=yes,left=20,top=20"
OpenNewWin.document.write("<html><head><title>Test Data</title></head><body>"
OpenNewWin.document.write("<h3><p align=""center"">Test Data<br>"
OpenNewWin.document.write(Data1)
OpenNewWin.document.write("</body></html>"
End Function
Is there something I am overlooking?
Thanx
Medwyn