Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
HTML coding in Excel VBA
Hello,
Can anybody tell me if this coding works with Excel 2002? Open OutputFile For Output As #1 LineInput = "<html<head<title" & HeaderData & "</title</head<body" HtmlWrite (LineInput) LineInput = "<basefont size=3<table cellpadding=0 cellspacing=0 width=100%<tr<td valign=top align=left" HtmlWrite (LineInput) LineInput = "<a href=""../mopscrud.htm""<strongCrude Platts</strong</a ... " HtmlWrite (LineInput) LineInput = "<a href=""../termcrud.htm""<strongTapis PTP</strong</a ... " HtmlWrite (LineInput) LineInput = "<a href=""ptp.htm""<strongTerm Prices</strong</a ... " HtmlWrite (LineInput) LineInput = "<a href=""../diff-tpc.htm""<strongTapis Trends</strong</a" HtmlWrite (LineInput) LineInput = "</td</tr</table<hr" HtmlWrite (LineInput) Thanks, Sheela |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
HTML coding in Excel VBA
I put your code into a module in Excel 2002 and my VBA editor didn't
recognize anything past the first line. 'LineInput' was not found in my Object Browser search. Bruce Cooley "Sheela" wrote in message ... : Hello, : : Can anybody tell me if this coding works with Excel 2002? : : Open OutputFile For Output As #1 : : LineInput = "<html<head<title" & HeaderData : & "</title</head<body" : HtmlWrite (LineInput) : LineInput = "<basefont size=3<table cellpadding=0 : cellspacing=0 width=100%<tr<td valign=top align=left" : HtmlWrite (LineInput) : LineInput = "<a href=""../mopscrud.htm""<strongCrude : Platts</strong</a ... " : HtmlWrite (LineInput) : LineInput = "<a href=""../termcrud.htm""<strongTapis : PTP</strong</a ... " : HtmlWrite (LineInput) : LineInput = "<a href=""ptp.htm""<strongTerm : Prices</strong</a ... " : HtmlWrite (LineInput) : LineInput = "<a href=""../diff-tpc.htm""<strongTapis : Trends</strong</a" : HtmlWrite (LineInput) : : LineInput = "</td</tr</table<hr" : HtmlWrite (LineInput) : : : Thanks, : Sheela : |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
HTML coding in Excel VBA
She was using LineInput as the name of a variable. VBA does have a Line Input command (2 words),
so IMO LineInput isn't a good choice for a variable name -- too confusing. On Mon, 08 Sep 2003 04:07:40 GMT, "Bruce Cooley" wrote: I put your code into a module in Excel 2002 and my VBA editor didn't recognize anything past the first line. 'LineInput' was not found in my Object Browser search. Bruce Cooley "Sheela" wrote in message ... : Hello, : : Can anybody tell me if this coding works with Excel 2002? : : Open OutputFile For Output As #1 : : LineInput = "<html<head<title" & HeaderData : & "</title</head<body" : HtmlWrite (LineInput) : LineInput = "<basefont size=3<table cellpadding=0 : cellspacing=0 width=100%<tr<td valign=top align=left" : HtmlWrite (LineInput) : LineInput = "<a href=""../mopscrud.htm""<strongCrude : Platts</strong</a ... " : HtmlWrite (LineInput) : LineInput = "<a href=""../termcrud.htm""<strongTapis : PTP</strong</a ... " : HtmlWrite (LineInput) : LineInput = "<a href=""ptp.htm""<strongTerm : Prices</strong</a ... " : HtmlWrite (LineInput) : LineInput = "<a href=""../diff-tpc.htm""<strongTapis : Trends</strong</a" : HtmlWrite (LineInput) : : LineInput = "</td</tr</table<hr" : HtmlWrite (LineInput) : : : Thanks, : Sheela : |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
HTML coding in Excel VBA
There must be a function/sub created by the author of the code titled
htmlwrite. Otherwise your code is non-functional. There is no built in VBA command htmlwrite. I provided a reference on how to write out a text file. If you can't find the orginal author's htmlwrite function/sub, then you can write you own using the reference. -- Regards, Tom Ogilvy "Sheela" wrote in message ... Is there another way of writing this code? There are so many lines created which starts with "LineInput = ..." and followed by "HtmlWrite (LineInput)". I believe the first one is to input the lines and the second if to display the message. If this is not working, what is the other way to write this html coding in VBA? Below is the sample coding for you to have a better picture on the coding flow. ------------------------------ Open OutputFile For Output As #1 LineInput = "<html<head<title" & HeaderData & "</title</head<body" HtmlWrite (LineInput) LineInput = "<basefont size=3<table cellpadding=0 cellspacing=0 width=100%<tr<td valign=top align=left" HtmlWrite (LineInput) LineInput = "<a href=""../mopscrud.htm""<strongCrude Platts</strong</a ... " HtmlWrite (LineInput) LineInput = "<a href=""../termcrud.htm""<strongTapis PTP</strong</a ... " HtmlWrite (LineInput) LineInput = "<a href=""ptp.htm""<strongTerm Prices</strong</a ... " HtmlWrite (LineInput) LineInput = "<a href=""../diff-tpc.htm""<strongTapis Trends</strong</a" HtmlWrite (LineInput) LineInput = "</td</tr</table<hr" HtmlWrite (LineInput) If HeaderData < "" Then LineInput = "<font size=+2 color=red" & HeaderData & "</font" HtmlWrite (LineInput) End If If DescriptionText < "" Then LineInput = "<I" & DescriptionText & "</I" HtmlWrite (LineInput) End If LineInput = "<br<p" HtmlWrite (LineInput) LineInput = "<table border<caption<b" & TableCaption & "</b</caption" HtmlWrite (LineInput) ------------------------ Thanks, Sheela -----Original Message----- She was using LineInput as the name of a variable. VBA does have a Line Input command (2 words), so IMO LineInput isn't a good choice for a variable name -- too confusing. On Mon, 08 Sep 2003 04:07:40 GMT, "Bruce Cooley" wrote: I put your code into a module in Excel 2002 and my VBA editor didn't recognize anything past the first line. 'LineInput' was not found in my Object Browser search. Bruce Cooley "Sheela" wrote in message ... : Hello, : : Can anybody tell me if this coding works with Excel 2002? : : Open OutputFile For Output As #1 : : LineInput = "<html<head<title" & HeaderData : & "</title</head<body" : HtmlWrite (LineInput) : LineInput = "<basefont size=3<table cellpadding=0 : cellspacing=0 width=100%<tr<td valign=top align=left" : HtmlWrite (LineInput) : LineInput = "<a href=""../mopscrud.htm""<strongCrude : Platts</strong</a ... " : HtmlWrite (LineInput) : LineInput = "<a href=""../termcrud.htm""<strongTapis : PTP</strong</a ... " : HtmlWrite (LineInput) : LineInput = "<a href=""ptp.htm""<strongTerm : Prices</strong</a ... " : HtmlWrite (LineInput) : LineInput = "<a href=""../diff-tpc.htm""<strongTapis : Trends</strong</a" : HtmlWrite (LineInput) : : LineInput = "</td</tr</table<hr" : HtmlWrite (LineInput) : : : Thanks, : Sheela : . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Stop excel from processing HTML? IE paste raw html. | Excel Discussion (Misc queries) | |||
Excel 2003 VB CODING | Excel Discussion (Misc queries) | |||
VBA/Excel help - Coding ComboBoses...... | Excel Discussion (Misc queries) | |||
Can Excel do this with coding? | Excel Worksheet Functions | |||
help with coding in excel | Excel Worksheet Functions |