Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Answers to questions posing more questions in a workbook | Excel Worksheet Functions | |||
questions about at sum | Excel Discussion (Misc queries) | |||
View Questions and Answer to questions I created | Excel Discussion (Misc queries) | |||
2 questions | Excel Discussion (Misc queries) | |||
2 questions | Excel Discussion (Misc queries) |