Alaska Software Inc. - Help setting "borders" to a group of cells
Username: Password:
AuthorTopic: Help setting "borders" to a group of cells
Juan GonzalezHelp setting "borders" to a group of cells
on Mon, 09 Jan 2023 16:15:43 +0100
Hello,
I am having trouble with the sintax to set a border to a group of cells while 
generating an Excel file trough ActiveX. All the other properties (format, 
colors, etc) are working ok in my code.

This is the part of code with the problem:

oRange:=oExcel:Range("E8:O9")
oRange:Borders["xlEdgeBottom"]:LineStyle:="xlMedium"

But returns error "Parameter has wrong data type".
I cant find where...

Thank you very much,
Juan.
Jim LeeRe: Help setting "borders" to a group of cells
on Tue, 10 Jan 2023 00:22:52 +0100
hi,

> oRange:Borders["xlEdgeBottom"]:LineStyle:="xlMedium"
>
> But returns error "Parameter has wrong data type".

hi,

#DEFINE 
         -4138

to "generate" *.CH of all Constante use Tlb2Ch.exe

Tlb2Ch.exe "EXCEL.APPLICATION" >> EXCEL.CH
Juan GonzalezRe: Help setting "borders" to a group of cells
on Tue, 10 Jan 2023 11:52:55 +0100
Hello Jim, thank you for your answer.

I am using excel.ch in my project, so all the constants are defined here. I 
can find xlEdgeBottom and xlMedium...

There is some other syntax error in my line

oRange:Borders["xlEdgeBottom"]:LineStyle:="xlMedium"

Regards,
JJ


Jim Lee wrote in message news:7a88ca90$1fc6dfa0$1117ac@news.alaska-
software.com...
>hi,
>
>> oRange:Borders["xlEdgeBottom"]:LineStyle:="xlMedium"
>>
>> But returns error "Parameter has wrong data type".
>
>hi,
>
>#DEFINE 
>         -4138
>
>to "generate" *.CH of all Constante use Tlb2Ch.exe
>
>Tlb2Ch.exe "EXCEL.APPLICATION" >> EXCEL.CH
Regan CawkwellRe: Help setting "borders" to a group of cells
on Tue, 10 Jan 2023 12:31:14 +0100
Juan Gonzalez wrote in message news:10da73ff$3fa782e1$110d28@news.alaska-software.com...
>Hello Jim, thank you for your answer.
>
>I am using excel.ch in my project, so all the constants are defined here. I 
>can find xlEdgeBottom and xlMedium...
>
>There is some other syntax error in my line
>
>oRange:Borders["xlEdgeBottom"]:LineStyle:="xlMedium"
>
>Regards,
>JJ
>
>
>Jim Lee wrote in message news:7a88ca90$1fc6dfa0$1117ac@news.alaska-
>software.com...
>>hi,
>>
>>> oRange:Borders["xlEdgeBottom"]:LineStyle:="xlMedium"
>>>
>>> But returns error "Parameter has wrong data type".
>>
>>hi,
>>
>>#DEFINE 
>>         -4138
>>
>>to "generate" *.CH of all Constante use Tlb2Ch.exe
>>
>>Tlb2Ch.exe "EXCEL.APPLICATION" >> EXCEL.CH

Check out:

https://learn.microsoft.com/en-us/office/vba/api/excel.xlbordersindex
https://learn.microsoft.com/en-us/office/vba/api/excel.xlborderweight

Regan
Damir HodakRe: Help setting "borders" to a group of cells
on Tue, 10 Jan 2023 15:39:24 +0100
On Tue, 10 Jan 2023 11:52:55 +0100, Juan Gonzalez wrote:

> Hello Jim, thank you for your answer.
> 
> I am using excel.ch in my project, so all the constants are defined here. I 
> can find xlEdgeBottom and xlMedium...
> 
> There is some other syntax error in my line
> 
> oRange:Borders["xlEdgeBottom"]:LineStyle:="xlMedium"
> 
> Regards,
> JJ
> 
> 
> Jim Lee wrote in message news:7a88ca90$1fc6dfa0$1117ac@news.alaska-
> software.com...
>>hi,
>>
>>> oRange:Borders["xlEdgeBottom"]:LineStyle:="xlMedium"
>>>
>>> But returns error "Parameter has wrong data type".
>>
>>hi,
>>
>>#DEFINE 
>>         -4138
>>
>>to "generate" *.CH of all Constante use Tlb2Ch.exe
>>
>>Tlb2Ch.exe "EXCEL.APPLICATION" >> EXCEL.CH

Hi Juan!

Your line should be:

oRange:Borders[xlEdgeBottom]:LineStyle:=xlMedium

Regards
Damir