Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 179
Default VB questions

Eric


Is there a way to read in a value from VB 6.0 that tells if an Excel cell
has borders, without using Excel?
I think I can figure it out using the Excel.Application, Excel.Worksheet,
etc objects, but this starts an instance of Excel, which not only requires
any computer that runs it to have Excel installed, but is also slower than
other methods. I managed to export Excel data using both ADO and DAO, but

I
don't see anywhere that these methods can see border values.


I doubt it. I think you will have automate Excel to see if there are
borders. You won't be able to get any formatting data out of excel via ADO
or DAO (or any other database interface that I know).

Is there an official MS list of the values returned from Excel? I tested
pulling in the border values using Excel objects, and they returned weird
numbers from -4142 to 1 to -4118... they don't make sense. If there's a
reserved word or something that would contain the values instead of coding
in goofy numbers, that would be nice.


Which border values? Excel help can identify the built-in constants to
which those numbers relate, but the Border object has a lot of properties,
so you have to be more specific. For instance

?range("a1").Borders(xlEdgeBottom).LineStyle
-4119
?xldouble
-4119

xldouble is one of the built-in constants that you can use to set the
LineStyle property. Its intrinsic value is -4119. In VBA help, look up the
property that interests you and it will tell you the valid built-in
constants. Unfortunately, it won't tell you the intrinsic values, for that
you need to go to the Immediate Window (as I did above). Another option is
to go to the Object Browser (VBE - F2), select the Excel Object Library from
the drop down and look at the elements of the globals class. Selecting a
built-in constant there will tell you its value.

A word of caution: If you decide that you must use automation and you late
bind to the Excel library, then you can't use built-in constants, you have
to use the value. If you early bind, you can use the constants.


What does it mean when I exit VB and get a message "vb6.exe has generated
error and will be closed by Windows. You will need to restart the

program.
An error log is being created." Is there something I can do to fix that?
What/where is this error log? Is it anything useful? I get that every

time
I exit the program. The program works fine otherwise. It's just

annoying.
I tried uninstalling and reinstalling VB.



No idea. You might ask that in a vb6 newsgroup.

--
Dick Kusleika
MVP - Excel
www.dicks-clicks.com
Post all replies to the newsgroup.


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
Answers to questions posing more questions in a workbook sbelle1 Excel Worksheet Functions 2 August 8th 09 01:02 AM
questions about at sum nreily Excel Discussion (Misc queries) 2 May 14th 09 04:27 PM
View Questions and Answer to questions I created Roibn Taylor Excel Discussion (Misc queries) 4 July 24th 08 12:05 AM
2 questions Shawn iin Philly Excel Discussion (Misc queries) 1 October 8th 06 03:08 AM
2 questions andym Excel Discussion (Misc queries) 1 April 11th 05 02:37 PM


All times are GMT +1. The time now is 04:54 AM.

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"