Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 43
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 124
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Stop excel from processing HTML? IE paste raw html. nick Excel Discussion (Misc queries) 2 April 21st 23 05:12 PM
Excel 2003 VB CODING Neil Holden Excel Discussion (Misc queries) 2 February 17th 10 11:15 AM
VBA/Excel help - Coding ComboBoses...... chadtastic Excel Discussion (Misc queries) 2 August 29th 07 09:57 PM
Can Excel do this with coding? Dan the Man[_2_] Excel Worksheet Functions 6 August 10th 07 03:44 PM
help with coding in excel associates Excel Worksheet Functions 3 June 7th 06 10:41 AM


All times are GMT +1. The time now is 09:44 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"