Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks for response Mr. Pearson:
1) Intellisense Just realized what was going on. Intellisense works when typing oWB.Activesheet Intellisense FAILS when typing With oWB.Activesheet <<< With Stops Intellisense <<< and any subsequent lower tier 2) Object Browser Still got issues with this one. With all Libraries Searched for Range Found Range Class Cells listed under Range Class Clicked on Cells COULD NOT FIND Value or Formula ------------------------- Next Tried Searching for -- ActiveSheet Found it Under Application Clicked ActiveSheet didn't get anything (was looking to see if Columns showed up. ----------------- Any book or web page you know of that gives a step by step walkthrough of Excel objects browser or how the Excel object is tiered (in detail)? 3) Date Issue. As previously indicated resolved. But thanks for great explanation on the 2008 day offset. Makes sense NOW! David "Chip Pearson" wrote in message ... If you have a reference to the Excel object in your VB5/6 program how do you get intellisense to work for Excel objects? It should work for Excel objects if you are referencing the Excel typelib. I assume that by "have a reference to the Excel object" you mean that you have set a reference to the typelib. If you aren't referencing the typelib but instead doing something like Dim XL As Object Set XL = CreateObject("Excel.Application") the you won't have intellisense since XL is a generic object. I don't have VB5 but it works in VB6. I find the Excel object browser confusing. I never seem to be able to drill down to what I need. Take "Range" for Example, why doesn't "Cell" show under the Range object? "Cell" doesn't show up in the Object Browser because there is no object with the name "Cell". "Cells" (plural) is listed. 2a) Where do you find all the formatting properties that apply to Column, Row and Cell? A column, a row, and a cell are all Range objects. There is no such object as a "Column" or "Row", but you can get a Range object that refers to the entire row or column, using the EntireRow or EntireColumn properties of a range. These return Range objects. You can apply to a column Range or row Range any formatting that you can for a cell. To format a Range, you typically use one or more of the following properties of a Range object: Font, Interior, Borders. You can see these in the Object Browser under the Range object, and see what properties these objects have that you can use. You can format a single cell or an entire column or an entire row: Range("A1").Font.Size = 14 ' one cell Range("A1").EntireColumn.Font.Size = 14 ' entire column Range("A1").EntireRow.Font.Size = 14 ' entire row 3) Instead of getting the year only (2008) in Cell(1, "A") I keep getting "6/30" -- and the year is 1905 but does Not show but this is the Dates are stored internally as the number of days since 0-Jan-1900. When you enter a date in a cell, you MUST enter the date in a format that Excel can recognize as a date, such as mm/dd or mm/dd/yyyy. The number format of a cell has NOTHING to do with how you must enter data. It applys ONLY to the output display. When you enter 2008 in a cell, Excel doesn't recognize that as a date. It treats it as a simple number. Then, when you format the cell as a date, you'll get 30-June-1905, which is, wait for it, 2008 days since 0-Jan-1900. Cordially, Chip Pearson Microsoft Most Valuable Professional Excel Product Group, 1998 - 2009 Pearson Software Consulting, LLC www.cpearson.com (email on web site) On Mon, 6 Apr 2009 16:57:18 -0400, "David" wrote: All questions apply to VB5/6 1) Intellisense If you have a reference to the Excel object in your VB5/6 program how do you get intellisense to work for Excel objects? -------------------- 2) Object Browser I find the Excel object browser confusing. I never seem to be able to drill down to what I need. Take "Range" for Example, why doesn't "Cell" show under the Range object? 2a) Where do you find all the formatting properties that apply to Column, Row and Cell? ---------------------- 3) Instead of getting the year only (2008) in Cell(1, "A") I keep getting "6/30" -- and the year is 1905 but does Not show but this is the value. I recognize I have the Column formatted as Date, How the @#$%&^ do you format an individual cell as text, general or date = "yyyy" Help? I do the following: 'Set column and Cell Formats With oWB.ActiveSheet 'Date Column With .Columns("A:A") .NumberFormat = "MM/DD" End With ' .Cell(1, "A").NumberFormat = "YYYY" '<< ERRORS 'Center Headers and make Bold With .Rows("1:3") .HorizontalAlignment = xlCenter .VerticalAlignment = xlBottom .WrapText = False .Orientation = 0 .ShrinkToFit = False .MergeCells = False .Font.Bold = True End With 'Enter Value (year only) .Cells(1, "A").Value = strAcctYear '<<ERROR shows 6/30/1905 ' when strAcctYear = 2008 End With |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Object browser icons? | Excel Programming | |||
VBA and Object Browser Help Missing | Setting up and Configuration of Excel | |||
Object Browser does what? | Excel Programming | |||
Object Browser Help | Excel Programming | |||
Object Browser Help | Excel Programming |