![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
#3
| |||
| |||
|
#4
| |||
| |||
|
|
Oh, and I forgot to add that HasAxis is not a property of Excel._Chart, Excel.Chart, or Excel.ChartClass. At a quick glance, those seem to have all the same properties and methods -- has anyone found documentation on why there are three different ones and what they are for? |
|
I'm trying to pull as much of my code from Microsoft examples as possible. They use "Sheets" and "_Worksheet" in the example I saw -- I wonder why they choose to use the underscore Worksheet as opposed to just "Worksheet"? Excel.Sheets oSheets; Excel._Worksheet oSheet; |
#5
| |||
| |||
|
|
I just keep coming up with questions.. The macro code has the following: ActiveChart.SeriesCollection(1).Select With Selection.Border .Weight = xlThin .LineStyle = xlAutomatic End With or try casting Selection.Shadow = False Selection.InvertIfNegative = False This creates several questions for me -- the first is SeriesCollection(1) returns an object, and even if you cast it to the type SeriesCollection there is no Select() method to set the Selection object to it. Even if there was, I haven't found a "Selection" object in the PIA object model, so I can't tell where you would even find the Border property, the Shadow property, etc. If anyone could help with any of these, that would be fantastic. Thanks! Kevin |
#6
| |||
| |||
|
|
you will have to use range.select e.g. Microsoft.Office.Interop.Excel.Range oRange; oRange = oSheet.get_Range("A1", "A1"); // put your own range here oRange .Select; or try casting. good luck BTW would you know 1 the range name one get from, Control Home, shiftCONtrol End 2 how to move the cursor or selection using simulated key press on the active sheet "Kevin" <JunkMailOnl... (AT) yahoo (DOT) com> wrote in message news:1181340790.373677.241310 (AT) q75g2000hsh (DOT) googlegroups.com... I just keep coming up with questions.. The macro code has the following: ActiveChart.SeriesCollection(1).Select With Selection.Border .Weight = xlThin .LineStyle = xlAutomatic End With or try casting Selection.Shadow = False Selection.InvertIfNegative = False This creates several questions for me -- the first is SeriesCollection(1) returns an object, and even if you cast it to the type SeriesCollection there is no Select() method to set the Selection object to it. Even if there was, I haven't found a "Selection" object in the PIA object model, so I can't tell where you would even find the Border property, the Shadow property, etc. If anyone could help with any of these, that would be fantastic. Thanks! Kevin- Hide quoted text - - Show quoted text - |
#7
| |||
| |||
|
|
Thanks for the replies. For your questions, I'm not sure if this is how you do it, but I record a macro doing what I want, then try to convert the VBA code into my C# project. This may not be what you want, but to select the entire sheet my macro code was: Range("A1").Select Range(Selection, ActiveCell.SpecialCells(xlLastCell)).Select Range(Selection, Selection.End(xlToRight)).Select Range(Selection, Selection.End(xlDown)).Select Or that the range would be Range("A1:IV65536").Select I could not find a way to move the cursor like you were pressing keys. Only by doing Range("F13").Select maybe for each cell? Kevin On Jun 16, 1:50 pm, "GS" <gsmsnews.microsoft.co... (AT) msnews (DOT) Nomail.com wrote: you will have to use range.select e.g. Microsoft.Office.Interop.Excel.Range oRange; oRange = oSheet.get_Range("A1", "A1"); // put your own range here oRange .Select; or try casting. good luck BTW would you know 1 the range name one get from, Control Home, shiftCONtrol End 2 how to move the cursor or selection using simulated key press on the active sheet "Kevin" <JunkMailOnl... (AT) yahoo (DOT) com> wrote in message news:1181340790.373677.241310 (AT) q75g2000hsh (DOT) googlegroups.com... I just keep coming up with questions.. The macro code has the following: ActiveChart.SeriesCollection(1).Select With Selection.Border .Weight = xlThin .LineStyle = xlAutomatic End With or try casting Selection.Shadow = False Selection.InvertIfNegative = False This creates several questions for me -- the first is SeriesCollection(1) returns an object, and even if you cast it to the type SeriesCollection there is no Select() method to set the Selection object to it. Even if there was, I haven't found a "Selection" object in the PIA object model, so I can't tell where you would even find the Border property, the Shadow property, etc. If anyone could help with any of these, that would be fantastic. Thanks! Kevin- Hide quoted text - - Show quoted text - |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |