Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cognos Script - Excel VBA Problem 1

Status
Not open for further replies.

fuhbar

Technical User
May 14, 2002
63
DE
Dear all,

I am saving my reports as Excel File with Format. After that I open the files and try to format them via Cognos Script /VBA.

One formatting task is to set the borders for some cells.
I use the following line of code:

objExcel.Application.ActiveSheet.Range("A1:G3").Borders.LineStyle = xlContinuous

Problem: Cognos Script comes up with an error message: variable "xlContinuous" is not defined.

How do I solve this?

In my other script I can use constants like "xldown" for formatting. I am bit despaired.

Regards
f.
 
fuhbar,
This is due to excel having a list of constants and values. I found on the internet a list of all excel constants for Excel 97. MOst are carried over to 2000 and 2002/3.

In this list, xlContinuous = 1. Change xlContinuous to 1 and try the script. (xlDown has a value of -4121).

I'd post the list here except for the fact it's over 1200 lines long and is probably copyrighted. I do find it amusing that xlZero has a value of 2!

lex

soi la, soi carre
 
Dear drlex,

thank you very much, I was searching such a list, but I could not found one.

The only thing, which bothers me, is that in my other similar scripts "xlcontinous" or "xldown" is working...

Could you post the link to the list?

F.
 
forget it, I found one ;)

everytime the wrong words for the search...

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top