Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
avi avi is offline
external usenet poster
 
Posts: 195
Default vb6 vs vba question

Hello,

I have a a piece of code that works well in VBA

The same code works well in VB6 apart the
"fill.Fill.OneColorGradient ...." line

xlApp.ActiveChart.SeriesCollection(1).Select
With xlApp.Selection
.Interior.ColorIndex = 13
.Fill.Visible = True
.Fill.ForeColor.SchemeColor = 12
.Fill.OneColorGradient Style:=msoGradientDiagonalDown,
Variant:=3, Degree:=0.903
End With

Could be that vb6 does not support some vba commands?

Thanks a lot
Avi
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default vb6 vs vba question

Try:

.Fill.OneColorGradient Style:=4

RBS


"avi" wrote in message
...
Hello,

I have a a piece of code that works well in VBA

The same code works well in VB6 apart the
"fill.Fill.OneColorGradient ...." line

xlApp.ActiveChart.SeriesCollection(1).Select
With xlApp.Selection
.Interior.ColorIndex = 13
.Fill.Visible = True
.Fill.ForeColor.SchemeColor = 12
.Fill.OneColorGradient Style:=msoGradientDiagonalDown,
Variant:=3, Degree:=0.903
End With

Could be that vb6 does not support some vba commands?

Thanks a lot
Avi


  #3   Report Post  
Posted to microsoft.public.excel.programming
avi avi is offline
external usenet poster
 
Posts: 195
Default vb6 vs vba question

It works!!!!

Thanks
Avi
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default vb6 vs vba question

Things like msoXXX and XlXXX are MS Office and Excel constants respectively
and
when you use these in VB6 you need the actual value.
The simplest way to find out what these values are is to open the immediate
window in
the VBE by pressing Ctrl + G and then type in ? followed by the constant.
Then press the return key. There you will see the actual value.

RBS


"avi" wrote in message
...
It works!!!!

Thanks
Avi


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default vb6 vs vba question

The simplest way to find out what these values are is to open the
immediate


Or just set a reference to the Office typelib and use the constant name.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel, 10 Years
Pearson Software Consulting
www.cpearson.com
(email on the web site)


"RB Smissaert" wrote in message
...
Things like msoXXX and XlXXX are MS Office and Excel constants
respectively and
when you use these in VB6 you need the actual value.
The simplest way to find out what these values are is to open the
immediate window in
the VBE by pressing Ctrl + G and then type in ? followed by the constant.
Then press the return key. There you will see the actual value.

RBS


"avi" wrote in message
...
It works!!!!

Thanks
Avi





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default vb6 vs vba question

In general I try to avoid references as they can cause serious problems.
If the library is only for used for constants I would probably go with the
actual values.

RBS


"Chip Pearson" wrote in message
...
The simplest way to find out what these values are is to open the
immediate


Or just set a reference to the Office typelib and use the constant name.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel, 10 Years
Pearson Software Consulting
www.cpearson.com
(email on the web site)


"RB Smissaert" wrote in message
...
Things like msoXXX and XlXXX are MS Office and Excel constants
respectively and
when you use these in VB6 you need the actual value.
The simplest way to find out what these values are is to open the
immediate window in
the VBE by pressing Ctrl + G and then type in ? followed by the constant.
Then press the return key. There you will see the actual value.

RBS


"avi" wrote in message
...
It works!!!!

Thanks
Avi




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
Excel 2007 Macro/VB Question DDE Question MadDog22 Excel Worksheet Functions 1 March 10th 10 01:47 AM
Good morning or good evening depending upon your location. I want to ask you the most important question of your life. Your joy or sorrow for all eternity depends upon your answer. The question is: Are you saved? It is not a question of how good davegb Excel Programming 1 May 6th 05 06:35 PM
Good morning or good evening depending upon your location. I want to ask you the most important question of your life. Your joy or sorrow for all eternity depends upon your answer. The question is: Are you saved? It is not a question of how good you [email protected] Excel Programming 0 April 27th 05 07:46 PM
Good morning or good evening depending upon your location. I want to ask you the most important question of your life. Your joy or sorrow for all eternity depends upon your answer. The question is: Are you saved? It is not a question of how good you [email protected] Excel Programming 23 April 23rd 05 09:26 PM
Good morning or good evening depending upon your location. I want to ask you the most important question of your life. Your joy or sorrow for all eternity depends upon your answer. The question is: Are you saved? It is not a question of how good you [email protected] Excel Programming 0 April 22nd 05 03:30 PM


All times are GMT +1. The time now is 10:33 AM.

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

About Us

"It's about Microsoft Excel"