[thelist] ASP question

Jerry Scannell JerryScannell at cox.net
Tue Nov 5 13:38:17 CST 2002


--
[ Picked text/plain from multipart/alternative ]
I am interfacing my .ASP driven web pages to Excel.  This has worked quite well, so far.  I utilize the Macro facility of Excel to initiate a recording, do some cell formatting, stop the recording, edit the macro, cut-and-paste the VB code into my .ASP file and modify it ever so slightly and voila it is now part and parcel of my asp app.

Here's one that doesn't work.  I want to make the first 10 characters of:  Historical Representation bold so it will look
like: Historical Representation

I initiated a macro to just Bold the first 10 characters and this is the code generated:

    With ActiveCell.Characters(Start:=1, Length:=10).Font
        .Name = "Arial"
        .FontStyle = "Bold"
        .Size = 12
        .Strikethrough = False
        .Superscript = False
        .Subscript = False
        .OutlineFont = False
        .Shadow = False
        .Underline = xlUnderlineStyleSingle
        .ColorIndex = xlAutomatic
    End With

ASP has a serious problem with: With ActiveCell.Characters(Start:=1, Length:=10).Font

I get the following error message:
Microsoft VBScript compilation error '800a03f2'

Expected identifier

/smld/includes/excel.inc, line 249

With .ActiveCell.Characters.(Start:=1, Length:=10).Font
----------------------------^
I'm not sure what object coding (Start:=1, Length:=10) means.??  I tried modifying the code to:
      .ActiveCell.Characters.Start  = 1
      .ActiveCell.Characters.Length = 10
      With .ActiveCell.Characters.Font

But the bolding didn't take effect so I am surmising that ....Characters.Start=1 and Length=10 isn't the same thing as: Characters.(Start:=1, Length:=10)

So, what is the solution?
Jerry
--




More information about the thelist mailing list