microsoft office 2003 web components visual basic reference · (msdn) web site for the latest...
TRANSCRIPT
![Page 1: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1.jpg)
NewObjects
VisittheOfficeDeveloperCenterontheMicrosoftDeveloperNetwork(MSDN)WebsiteforthelatestinformationaboutprogrammingwithMicrosoftOffice2003WebComponents,includingproductnews,technicalarticles,downloads,andsamples.
ThefollowingtablelistsobjectsaddedtotheMicrosoftOffice2003WebComponentsobjectmodel.
Object DescriptionChScrollView Usethepropertiesandmethodsofthe
ChScrollViewobjectreturninformationabout,ortoscrollandzoomtheviewofachart.
ChSelectionCollection UsetheChSelectionCollectioncollectiontoworkwithallcurrentlyselectedobjectsinachart.
ListObject AListObjectobjectrepresentsanXMLlistonaworksheet.
ListObjects UsethepropertiesandmethodsoftheListObjectscollectiontoworkwithalltheXMLlistsonaworksheet.
ListRow AListRowobjectrepresentsarowinanXMLlist.
ListRows UsethetheListRowscollectiontoworkwiththealltherowsinanXMLlist.
XmlDataBinding AnXmlDataBindingobjectrepresentsanXMLdatabindingforXMLlistsandmappeddatainaSpreadsheetcomponent.
XmlDataBindings UsetheXmlDataBindingscollectiontoworkwithalltheXMLdatabindingsinaSpreadsheetcomponent.
XmlMap AnXmlMapobjectrepresentsanXMLschemamapthatmapsXMLdatatotheworksheetsinaSpreadsheetcomponent.
XmlMaps UsetheXmlMapscollectiontoworkwithallof
![Page 2: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2.jpg)
theXMLschemamapsinaSpreadsheetcomponent.
![Page 3: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/3.jpg)
NewProperties(AlphabeticalList)
VisittheOfficeDeveloperCenterontheMicrosoftDeveloperNetwork(MSDN)WebsiteforthelatestinformationaboutprogrammingwithMicrosoftOffice2003WebComponents,includingproductnews,technicalarticles,downloads,andsamples.
ThefollowingtablelistspropertiesaddedtotheMicrosoftOffice2003WebComponentsobjectmodel(sortedalphabetically).
NewProperty Object(s)Active ListRowAllowUISelection ChartSpaceAsync XmlDataBindingBarWidth ChChartBindingData XmlDataBindingBindingInProgress XmlDataBinding,XmlDataBindingsCanQuery XmlDataBindingCanUpdate XmlDataBindingDataBodyRange ListObjectDefaultQueryOnLoad SpreadsheetHeaderRowRange ListObjectHorizontalExtent ChScrollViewHorizontalExtentMax ChScrollViewHorizontalPosition ChScrollViewInsertRowRange ListObjectListObject Range,WorkbookListObjects WorksheetListRows ListObjectLoadMode XmlDataBindingMapData XmlMapPropNames ListObjectScrollView ChChart
![Page 4: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/4.jpg)
SelectionCollection ChartSpaceVerticalExtent ChScrollViewVerticalExtentMax ChScrollViewVerticalPosition ChScrollViewXmlDataBindings WorkbookXmlMap XmlDataBindingXmlMaps Workbook
![Page 5: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/5.jpg)
NewProperties(byObject)
VisittheOfficeDeveloperCenterontheMicrosoftDeveloperNetwork(MSDN)WebsiteforthelatestinformationaboutprogrammingwithMicrosoftOffice2003WebComponents,includingproductnews,technicalarticles,downloads,andsamples.
ThefollowingtablelistspropertiesaddedtotheMicrosoftOffice2003WebComponentsobjectmodel(sortedbyobjectname).
Object NewPropertiesChartSpace AllowUISelection,SelectionCollectionChChart BarWidth,ScrollViewChScrollView HorizontalExtent,HorizontalExtentMax,
HorizontalPosition,VerticalExtent,VerticalExtentMax,VerticalPosition
ListObject DataBodyRange,HeaderRowRange,InsertRowRange,ListRows,PropNames
ListRow ActivePivotField SubtotalLabelBackColor,SubtotalLabelFont,
SubtotalLabelForeColor,SubtotalLabelHAlignment
Range ListObjectSpreadsheet DefaultQueryOnLoadWorkbook ListObject,XmlDataBindings,XmlMapsWorksheet ListObjectsXmlDataBinding Async,BindingData,BindingInProgress,
CanQuery,CanUpdate,LoadMode,XmlMapXmlDataBindings BindingInProgressXmlMap MapData
![Page 6: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/6.jpg)
NewMethods(AlphabeticalList)
VisittheOfficeDeveloperCenterontheMicrosoftDeveloperNetwork(MSDN)WebsiteforthelatestinformationaboutprogrammingwithMicrosoftOffice2003WebComponents,includingproductnews,technicalarticles,downloads,andsamples.
ThefollowingtablelistsmethodsaddedtotheMicrosoftOffice2003WebComponentsobjectmodel(sortedalphabetically).
NewMethod ObjectAdd XmlDataBindings,XmlMapsDelete XmlDataBinding,XmlMapExportMetaData XmlMapFireParametersOut SpreadsheetGetDataPointVisible ChSeriesExportXML XmlMapImportXml XmlMapOverrideDefaultElementFormatting ChChartDrawRefresh XmlDataBindingSelect2 ChPointSetExtent ChScrollViewSetPosition ChScrollViewUpdate XmlDataBindingValidate Range
![Page 7: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/7.jpg)
NewMethods(byObject)
VisittheOfficeDeveloperCenterontheMicrosoftDeveloperNetwork(MSDN)WebsiteforthelatestinformationaboutprogrammingwithMicrosoftOffice2003WebComponents,includingproductnews,technicalarticles,downloads,andsamples.
ThefollowingtablelistsmethodsaddedtotheMicrosoftOffice2003WebComponentsobjectmodel(sortedbyobjectname).
Object NewMethodChChartDraw OverrideDefaultElementFormattingChPoint Select2ChScrollView SetExtent,SetPositionChSeries GetDataPointVisibleRange ValidateSpreadsheet FireParametersOutXmlDataBinding Delete,Refresh,UpdateXmlDataBindings AddXmlMap Delete,ExportMetaData,ExportXML,ImportXmlXmlMaps Add
![Page 8: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/8.jpg)
NewEvents
VisittheOfficeDeveloperCenterontheMicrosoftDeveloperNetwork(MSDN)WebsiteforthelatestinformationaboutprogrammingwithMicrosoftOffice2003WebComponents,includingproductnews,technicalarticles,downloads,andsamples.
ThefollowingtablelistseventsaddedtotheMicrosoftOffice2003WebComponentsobjectmodel.
NewEvent ObjectBindingAdded SpreadsheetBindingCompleted SpreadsheetBindingDeleted SpreadsheetBindingError SpreadsheetBindingUpdated SpreadsheetParametersOutReady SpreadsheetRowReady Spreadsheet
![Page 9: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/9.jpg)
MakingConnectionstoExternalDataSourcesMoreSecureWhenyoudefineaconnectiontoanexternaldatasourceforanOfficeWebcomponentonaWebpage,thisinformationisstoredasanunencrypted(plaintext)connectionstringintheHTMLsource.Asaresult,auseropeningthepageinabrowsercaneasilyviewtheHTMLsourceforthepageandreadtheconnectionstring,whichmayincludeausernameandpassword,dependingonhowyoudefinedtheconnection.
Topreventunauthorizedaccessusinginformationfromtheconnectionstring,ifthedatasourcesupportsthismodeofauthentication,useWindowsAuthentication(alsoreferredtoasaTrustedConnectionandIntegratedSecurity),whichusesthecurrentuser'sMicrosoftWindowsaccounttoconnecttoanexternaldatasource.UsingWindowsAuthenticationtoconnecttoanexternaldatasourcehasthefollowingadvantages:
Theprogrammerorpagedesignerdoesn'thavetoenterausernameorpasswordtoconnecttothedatasource,sothatinformationcannotbeexposedinthepage'sHTMLsource.
Theuserofthepagedoesn'thavetoenterausernameorpasswordtoconnecttothedatasourcewhenopeningthepage,sothatinformationcannotbecompromisedwhileit'sbeingsenttotheserver.
OnlyaWindowsuseraccountthatisconfiguredinthesecuritysystemforthedatasourcewillbeallowedtoconnecttothatdatasource.
ImportantTouseWindowsAuthentication,theusersyouwanttoconnecttoanexternaldatasourcemusthaveuseraccountsonaWindowsdomain.UsersthataremembersofaWindowsWorkgroupcannotuseWindowsAuthentication.
![Page 10: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/10.jpg)
DefiningaConnectioninanOfficeWebComponent'sUserInterfaceForexample,toconnecttoMicrosoftSQLServerusingWindowsAuthenticationfromtheuserinterfaceoftheSpreadsheetcomponent,usethefollowingprocedurewhendefiningaconnection.
ImportantBeforeyoucanuseWindowsAuthenticationtoconnecttoaMicrosoftSQLServerdatabase,theserveradministratormustconfiguretheservertousethismodeofauthentication,andmustgrantloginaccesstoyourWindowsuseraccount(oragroupofwhichyouruseraccountisamember)aswellastheaccountsofanyusersyouwanttoaccessyoursolution.Additionally,theserveradministratorshouldgiveusers'accountstheminimumlevelofpermissionstothetablesorstoredproceduresrequiredforyoursolution.
1. Inthedesignwindow,makesurethespreadsheetisactivated.Forinstructions,seeHelpforyourdesignprogram.
2. ClickCommandsandOptionsonthetoolbar,andthenclicktheDataSourcetab.
3. ClickEdit,andthendouble-clickNewSQLServerConnection.
4. InServername,specifythenameoftheserver.
5. UnderLogoncredentials,clickUseWindowsAuthentication.
6. ClickNext,andthenfollowthedirectionsinremainingscreensoftheDataConnectionWizardtospecifythedatatoretrieve.
Notes
SomedesignprogramsdonotsupporttheSpreadsheet'sdesign-timeuserinterfacebydefault.Ifyouareusingsuchaprogram,theDataSourcetabwillnotbedisplayedinstep2.Toactivatethedesign-timeuserinterface,youmustsettheDisplayDesignTimeUIpropertytoTrue.
OtherdatasourcesthatsupportWindowsAuthenticationmaypresentdifferentoptionsintheDataConnectionWizard.Forexample,to
![Page 11: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/11.jpg)
connecttoanOracledatabaseusingWindowsAuthentication,youmustenteronlyaforwardslash(/)intheUserNamebox.FormoreinformationusingWindowsAuthenticationtoconnecttoadatasource,seethedocumentationforthedatasourceprovideryouareusing.
IfyouusetheDataRetrievalServiceforMicrosoftSQLServer(oruseaDataRetrievalServiceConnections(.uxdc)filethatisdefinedtousethatdataretrievalservice)toconnecttoanexternaldatasource,andyoudonotuseWindowsAuthentication,theusernameandpasswordusedtoconnecttothedatasourcearenotsavedintheWebpage.Whenyouusethismethodtoconnecttoanexternaldatasource,usersoftheWebPagethathostsyourspreadsheetwillbepromptedtoentertheirlogininformation.Touseadataretrievalservice,youmusthaveaccesstoaWindowsSharePointServicesserveronwhichthatdataretrievalserviceisinstalled.Bydefault,WindowsSharePointServicesinstallsadataretrievalserviceforconnectingtodatainSharePointlists.ASharePointsiteadministratorcaninstalltheOffice2003WebPartsandComponentstoadddataretrievalservicesforMicrosoftSQLServerandMicrosoftBusinessSolutions.TheOffice2003WebPartsandComponentsisavailablefromDownloadsonMicrosoftOfficeOnline.Tostartdefiningaconnectionusingadataretrievalservice,instep2intheprocedureabove,clickEdit,clickNewSource,andthenclickeitherMicrosoftBusinessSolutions(toconnecttoMicrosoftBusinessSolutionsdata)orclickDataretrievalservices(toconnecttoWindowsSharePointServiceslistsorMicrosoftSQLServerdata).
![Page 12: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/12.jpg)
DefiningaConnectiontoExternalDataProgrammaticallyWhenworkingwiththeConnectionStringpropertytodefinetheconnectiontoanexternaldatasource(ordefiningtheconnectionstringforanADOConnectionobjecttopasstotheConnectionpropertyofthePivotTableobject),youshoulduseWindowsAuthenticationifpossible.TouseWindowsAuthenticationwithSQLServer,yourconnectionstringshouldusethisformat,whichincludesIntegratedSecurity=SSPI:
Provider=SQLOLEDB;DataSource=NameOfServer;InitialCatalog=NameOfDatabaseIntegratedSecurity=SSPI
Otherdatasourcesmayrequireadifferentformatfortheirconnectionstrings,forexampletoconnecttoanOracledatabaseusingWindowsAuthenticationrequiresyoutopassaforwardslash(/)fortheUserIDvalue:
Provider=MSDAORA.1;UserID=/;DataSource=NameOfServer;InitialCatalog=NameOfDatabase
![Page 13: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/13.jpg)
WorkingwithDataSourcesthatDoNotSupportWindowsAuthenticationIfWindowsAuthenticationisnotavailableforthedatasourceyouwanttoworkwith,youmustpassausernameandpasswordtoconnecttothedatasourcewhenyoudefineaconnectioneitherprogrammaticallyorintheuserinterfaceofanOfficeWebcomponent.BecausethisusernameandpasswordmightbeviewedwhentheSpreadsheet,Chart,orPivotTablecomponentisonaWebpage,avoidusingthismodeofauthenticationtoconnecttosensitivedatafromacomponentonaWebpage.Evenifyouarenotconcernedaboutunauthorizedusersviewingyourdata,youshouldconnectonlywithauseraccountthathaslimitedpermissionsonthedatasource.Forexample,whenconnectingtoaSQLServerdatabaseusingausernameandpassword,donotusetheSAaccountoranyotheraccountthathaselevatedpermissions,becauseanunauthorizedusermightbeabletousethisaccountandpasswordtoaccessotherdataontheserver.
![Page 14: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/14.jpg)
CreatinganAccessibleChartWhenyoucreateanewchart,bydefaulttheHasSelectionMarksandAllowPropertyToolBoxpropertiesaresettoFalse.Asaresult,auserworkingwithachartusingonlyakeyboardcannotseewhenaniteminthechartisselected(HasSelectionMarks)andcannotdisplaytheCommandsandOptionsdialogboxforsettingpropertiesoftheselecteditem(AllowPropertyToolBox).Toenablethesefeaturestomakeachartmoreaccessibleforkeyboardusers,youcansetthesepropertiesmanuallyatdesigntimebyusingthefollowingprocedure.
EnableselectionmarksandtheCommandsandOptionsdialogbox
1. Right-clicktheclickthechartcontrol,andthenclickCommandsandOptions.
2. OntheShow/HidetabunderLetusersview,clickSelectionmarksandCommandsandOptionsdialogbox.
Alternatively,youcansetthesepropertiesprogrammaticallyasinthefollowingexample.
SubMake_Accessible()
'Showselectionmarksforindividualchartelements.Chartspace1.HasSelectionMarks=True
'AllowtheusertodisplaytheCommandsandOptionsdialogbox.Chartspace1.AllowPropertyToolbox=True
EndSub
![Page 15: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/15.jpg)
AllGroupingDefsCollectionObject
Multipleobjects AllGroupingDefsGroupingDefPageFields
ContainsalloftheGroupingDefobjectsinthedatasourcecontrol.
![Page 16: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/16.jpg)
UsingtheAllGroupingDefsCollectionTheDataSourceControlobject'sAllGroupingDefspropertyreturnsanAllGroupingDefscollection.
![Page 17: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/17.jpg)
AllPageFieldsCollectionObject
Multipleobjects AllPageFieldsPageFieldMultipleobjects
ContainsallthePageFieldobjectsinthedatasourcecontrol.
![Page 18: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/18.jpg)
UsingtheAllPageFieldsCollectionTheDataSourceControlobject'sAllPageFieldspropertyreturnsanAllPageFieldscollection.
![Page 19: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/19.jpg)
BordersCollectionObject
Range BordersMultipleobjects
AcollectionoffourBorderobjectsthatrepresentthefourbordersofaworksheetrange.
![Page 20: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/20.jpg)
UsingtheBordersCollectionTheRangeobject’sBorderspropertyreturnsaBorderscollection.
![Page 21: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/21.jpg)
ChAxesCollection
ChChart ChAxesMultipleobjects
ThecollectionofChAxisobjectsthatrepresenttheaxesforasinglechart.Eachchartcanhaveuptosixteenaxes.
![Page 22: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/22.jpg)
UsingtheChAxescollectionTheChChartobject’sAxespropertyreturnsaChAxescollection.
![Page 23: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/23.jpg)
ChCategoryLabelsCollectionObject
ChAxis ChCategoryLabelsMultipleobjects
RepresentsacollectionofalltheChCategoryLabelobjectsforthespecifiedcategoryaxis.
![Page 24: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/24.jpg)
UsingtheChCategoryLabelsCollectionObjectUsetheCategoryLabelspropertyoftheChAxisobjecttoreturnaChCategoryLabelscollection.ThefollowingexampledisplaysthenumberoflabelsforthecategoryaxisonthefirstchartinChartspace1.
SubDisplayItemCount
DimchtChart1DimchConstantsSetchConstants=Chartspace1.ConstantsSetchtChart1=Chartspace1.Charts(0)MsgBoxchChart1.Axes(chConstants.chAxisPositionCategory)_.CategoryLabels.ItemCount
EndSub
![Page 25: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/25.jpg)
ChChartFieldsObject
ChDropZone ChChartFieldsMultipleobjects
Representsthefieldsthathavebeenaddedtoadropzone.ContainsacollectionofChChartFieldobjects.
![Page 26: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/26.jpg)
UsingtheChChartFieldsobjectTheChDropZoneobject'sChartFieldspropertyreturnsaChChartFieldsobject.
![Page 27: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/27.jpg)
ChChartsCollection
Multipleobjects ChChartsChChartMultipleobjects
ThecollectionofChChartobjectsinthechartworkspace.EachChChartobjectrepresentsasinglechart.Thechartworkspacecancontainupto64charts.
![Page 28: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/28.jpg)
UsingtheChChartscollectionTheChartSpaceobject’sChartspropertyreturnsaChChartscollection.
![Page 29: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/29.jpg)
ChDataLabelsCollectionCollection
ChSeries ChDataLabelsCollectionMultipleobjects
RepresentsthecollectionofChDataLabelsobjectsforadataseries.EachChDataLabelsobjectrepresentsasetofdatalabelsforadataseries.
![Page 30: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/30.jpg)
UsingtheChDataLabelsCollectioncollectionUsetheDataLabelsCollectionpropertyoftheChSeriesobjecttoreturnaDataLabelsCollectioncollection.
UsetheAddmethodoftheChDataLabelsCollectioncollectiontoaddasetofdatalabelstoadataseries.
ThefollowingexampleaddsdatalabelstothefirstseriesinthefirstchartinChartspace1,andthenformatsthedatalabels.
SubAddDataLabels()
DimserSeries1DimdlSeries1Labels
'Setavariabletothefirstseriesofthefirstchart'inChartspace1.SetserSeries1=ChartSpace1.Charts(0).SeriesCollection(0)
'Addasetofdatalabelstothefirstseriesandreturn'aDataLabelsobject.SetdlSeries1Labels=serSeries1.DataLabelsCollection.Add
'Setthenumberformatofthedatalabels.dlSeries1Labels.NumberFormat="0.00"
'Setthedatalabelstodisplaythecategory'nameforthedatapoint.dlSeries1Labels.HasCategoryName=True
'Setthedatalabelstodisplaythevalue'forthedatapoint.dlSeries1Labels.HasValue=True
![Page 31: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/31.jpg)
EndSub
![Page 32: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/32.jpg)
ChErrorBarsCollectionObject
ChSeries ChErrorBarsCollectionMultipleobjects
ThecollectionofChErrorBarsobjectsforasingleseries.
![Page 33: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/33.jpg)
UsingtheChErrorBarsCollectionobjectTheChSeriesobject’sErrorBarsCollectionpropertyreturnsaChErrorBarsCollectionobject.
ThefollowingexampleaddserrorbarstothefirstseriesinthefirstchartinChartSpace1,thensetsthepropertiesfortheerrorbars.
SubAddErrorBars()
DimchConstantsDimebCollectionDimebSeries1
SetchConstants=ChartSpace1.Constants
'Setavariabletothecollectionoferrorbarsfor'thefirstseriesinthefirstchartofChartspace1.SetebCollection=ChartSpace1.Charts(0).SeriesCollection(0).ErrorBarsCollection
'Adderrorbarstothechart.ebCollection.Add
'Setavariabletotheerrorbarsforthedataseries.SetebSeries1=ebCollection.Item(0)
'Settheerrorbarssothattheyrepresentacertain'percentageofthevalueofadatapoint.ebSeries1.Type=chConstants.chErrorBarTypePercent
'Theerrorbarsrepresent5%ofadatapoint.ebSeries1.Amount=0.05
![Page 34: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/34.jpg)
EndSub
![Page 35: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/35.jpg)
ChLegendEntriesCollection
ChLegend ChLegendEntriesMultipleobjects
ThecollectionofChLegendEntryobjectsforthespecifiedlegend.
![Page 36: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/36.jpg)
UsingtheChLegendEntriescollectionTheChLegendobject’sLegendEntriespropertyreturnsaChLegendEntriescollection.
UseLegendEntries(index),whereindexisthelegendentryindexnumber,toreturnasingleLegendEntryobject.Youcannotreturnlegendentriesbyname.
Theindexnumberrepresentsthepositionofthelegendentryinthelegend.LegendEntries(0)isatthetopofthelegend,andLegendEntries(LegendEntries.Count-1)isatthebottom.Thefollowingexamplechangesthefontforthetextofthelegendentryatthetopofthechartspacelegend(thisisusuallythelegendforseriesone)inChartspace1.
Chartspace1.ChartSpaceLegend.LegendEntries(0)_.Font.Bold=True
![Page 37: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/37.jpg)
ChPointsCollection
ChSeries ChPointsMultipleobjects
AcollectionofalltheChPointobjectsinadataseries.Thenumberofdatapointsinaseriesislimitedonlybytheamountofsystemmemoryinthecomputerbeingused.
![Page 38: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/38.jpg)
UsingtheChPointscollectionTheChSeriesobject’sPointspropertyreturnsaChPointscollection.
UsePoints(index),whereindexisthepointindexnumber,toreturnasingleChPointobject.Pointsarenumberedfromlefttorightontheseries.Points(0)istheleftmostpoint,andPoints(Points.Count-1)istherightmostpoint.ThefollowingexamplestoresthevalueofthethirdpointinthefirstdataseriesofthefirstchartinChartspace1inavariable.
SubGetPointValue()
DimptSeries1PointsDimdblPointValue
'Setavariabletothecollectionofpointsforthefirst'datasertiesinthefirstchartinChartspace1.SetptSeries1Points=ChartSpace1.Charts(0).SeriesCollection(0).Points
'Storetheunderlyingvalueofthethirddatapointinavariable.dblPointValue=ptSeries1Points(2).GetValue(chDimValues)
EndSub
![Page 39: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/39.jpg)
ChSelectionCollectionCollection
Multipleobjects ChSelectionCollection
![Page 40: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/40.jpg)
UsingtheChSelectionCollectionCollectionYouusetheSelectionCollectionpropertytoretrievetheselectionlist.TheSelectionCollectionpropertyoftheChartSpaceobject(forexample,ChartSpace.SelectionCollection)returnsaChSelectionCollectioncollectionthatcontainsallselectedobjectsinachart,includingbothprimaryandsecondaryselections.Theprimaryselectionisthefirstiteminthiscollection.Anyadditionalitemsaresecondaryselections,whichcanonlybeChPointobjects.Thiscollectionalwayscontainsatleastoneitem,whichistheprimaryselection.TheobjectreturnedbyChartSpace.SelectionCollection(0)isthesameobjectthatisreturnedbytheSelectionpropertyoftheChartSpaceobject(forexample,ChartSpace.Selection).TheChSelectionCollectioncollectioncanonlybepopulatedbyusingtheSelect2method,forexample,Chartspace.Charts(0).Seriescollection(x),Points(y).Select2().MultipleitemscannotbeselectedintheuserinterfaceoftheChartcomponent.Itemsmustbeaddedtoorremovedfromaselectionprogrammatically.Tocapturemultipleselectionswhenauserclicksonachart,youmustmonitorthemousemoveandmousebuttoneventsandidentifytheitemsbeingselectedusingtheRangeFromPointmethodoftheChartSpaceobject.Topreventthebuilt-inselectionhandlingbehavioroftheChartcomponentfrominterferingwithprogrammatictrackingofmultipleselections,youmustmakesurethattheAllowUISelectionpropertyoftheChartSpaceobjectissettoFalse.
YouusetheItempropertytoreturnasingleselectedobjectfromtheChSelectionCollectioncollection.IndividualobjectsintheChSelectionCollectioncollectionareindexedbeginningwith0forthefirstobject,1forthesecondobject,andsoforth.YouusetheCountpropertytoreturnthenumberofitemsintheChSelectionCollectioncollection.TheParentpropertyreturnstheparentobject,whichistheChartSpaceobjectinthiscase.
TheChSelectionCollectioncollectionhasnomethods.
![Page 41: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/41.jpg)
ChSeriesCollectionCollectionObject
ChChart ChSeriesCollectionMultipleobjects
AcollectionofalltheChSeriesobjectsonachart.Achartcancontainupto256series.
![Page 42: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/42.jpg)
UsingtheChSeriesCollectionCollectionObjectTheChChartobject’sSeriesCollectionpropertyreturnsaChSeriesCollectioncollection.
UsetheAddmethodtocreateanewseriesandaddittothechart.
UseSeriesCollection(index),whereindexistheseriesindexnumberorname,toreturnasingleChSeriesobject.ThefollowingexamplesetsthecoloroftheinteriorforthefirstseriesinthefirstchartofChartSpace1.
ChartSpace1.Charts(0).SeriesCollection(1).Interior.Color="Red"
![Page 43: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/43.jpg)
ChTrendlinesCollection
ChSeries ChTrendlinesMultipleobjects
ThecollectionofChTrendlineobjectsforaseries.
![Page 44: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/44.jpg)
UsingtheChTrendlinescollectionTheTrendlinespropertyoftheChSeriesobjectreturnsaChTrendlinescollection.
UsetheAddmethodoftheChTrendlineobjecttoaddatrendlinetoyourchart.
ThefollowingexampleaddsatrendlinetothefirstseriesinthefirstchartinChartspace1andthenformatsthetrendline.
SubAddPolyTrendline()
DimserSeries1DimchConstantsDimtlSeries1Trend
SetchConstants=ChartSpace1.Constants
'Setavariabletothefirstseriesofthefirstchart'inChartspace1.SetserSeries1=ChartSpace1.Charts(0).SeriesCollection(0)
'Addatrendlinetothefirstseriesandreturn'aTrendlineobject.SettlSeries1Trend=serSeries1.Trendlines.Add
'Displaytheequationusedtocalculatethetrendline.tlSeries1Trend.IsDisplayingEquation=True
'Setthetrendlinetobeapolynomialtrendline.tlSeries1Trend.Type=chConstants.chTrendlineTypePolynomial
EndSub
![Page 45: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/45.jpg)
![Page 46: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/46.jpg)
DataPagesCollectionObject
Multipleobjects DataPagesDataPageMultipleobjects
ContainsallDataPageobjectsinthedatasourcecontrol.
![Page 47: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/47.jpg)
UsingtheDataPagesCollectionTheDataSourceControlobject'sDataPagespropertyreturnsaDataPagescollection.
![Page 48: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/48.jpg)
ElementExtensionsCollectionObject
Multipleobjects ElementExtensionsElementExtension
ContainstheElementExtensionobjectsforthespecifieddatasourcecontrol.
![Page 49: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/49.jpg)
UsingtheElementExtensionsCollectionTheDataSourceControlobject'sElementExtensionspropertyreturnsanElementExtensionscollection.
![Page 50: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/50.jpg)
FiltersCollectionObject
AutoFilter FiltersMultipleobjects
RepresentsthecollectionoffiltersusedwiththeAutoFilter.EachfilterisrepresentedbyaFilterobject.TheAutoFilterobjectcontainsaFilterscollection,theFilterscollectioncontainsaFilterobjectforeachcolumninthefilteredrange,andeachFilterobjectcontainsaCriteriaobject.
![Page 51: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/51.jpg)
UsingtheFiltersObjectTheAutoFilterobject’sFilterspropertyreturnsaFilterscollection.
![Page 52: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/52.jpg)
GroupingDefsCollectionObject
RecordsetDef GroupingDefsGroupingDefPageFields
RepresentsthecollectionofGroupingDefobjectsthatcreategroupingparentsofthedetailrecordsinarecordsetdefinition.Sequenceisimportant:thelowertheindex,thehigherthelevelofgrouping.Index0(zero)isthelowestgroupinglevel.
![Page 53: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/53.jpg)
UsingtheGroupingDefsCollectionTheRecordsetDefobject'sGroupingDefspropertyreturnsaGroupingDefscollection.
![Page 54: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/54.jpg)
GroupLevelsCollectionObject
Multipleobjects GroupLevelsGroupLevel
RepresentsthecollectionofGroupLevelobjectsforthespecifieddatasourcecontrol.EachGroupLevelobjectrepresentsthesetofallrecordsatagivenlevelofthedataaccesspagehierarchy.
![Page 55: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/55.jpg)
UsingtheGroupLevelsCollectionTheDataSourceControlobject'sGroupLevelspropertyreturnsaGroupLevelscollection.
![Page 56: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/56.jpg)
HeadingsObject
Window HeadingsMultipleobjects
AcollectionoftherowandcolumnheadingsforaWindowobject.
![Page 57: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/57.jpg)
UsingtheHeadingsobjectThefollowingpropertiesreturnaHeadingscollection.
TheWindowobject'sRowHeadingsproperty.
TheWindowobject'sColumnHeadingsproperty.
ThefollowingexamplecustomizestheheadingofcolumnDintheactivesheetinSpreadsheet1:
Spreadsheet1.ActiveWindow.ColumnHeadings(4).Caption="1999Sales"
![Page 58: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/58.jpg)
ListObjectsCollection
Worksheet ListObjectsMultipleobjects
![Page 59: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/59.jpg)
UsingtheListObjectsCollectionTheListObjectscollectionisacollectionofalltheListObjectobjectsonaworksheet.AListObjectobjectrepresentsanXMLlistinaSpreadsheetcomponent.TheListObjectobjectisamemberoftheListObjectscollection.
IndividualListObjectobjectsintheListObjectscollectionareindexedbeginningwith1forthefirstobject,2forthesecondobject,andsoforth.YouusetheItempropertytoreturnasingleListObjectobjectfromtheListObjectscollection.TheargumentfortheItempropertyisthenameortheindexnumberintheListObjectscollectionoftheListObjectobject.ThenameisthevalueoftheIDattributeofanMapInfo/Map/EntryinanXMLSpreadsheetfile.TheXMLfragmentwherethesedetailsappearintheXMLSpreadsheetfilelookssomethinglikethefollowing:
<x2:MapInfoxmlns:x2="http://schemas.microsoft.com/office/excel/2003/xml"><x2:Mapx2:ID="Cust_MapId"><x2:Entryx2:ID="example_id"x2:Type="table">...</x2:Entry></x2:Map></x2:MapInfo>
Intheexampleabove,theIDvalueisexample_id.YoucanalsogetthenamebyusingtheNamepropertyoftheListObjectobject.UsingMicrosoftExcel,youcancreateanXMLSpreadsheetfilebycreatingadataboundspreadsheetandthensavingtheworkbookasanXMLSpreadsheet.
Youusetheread-onlyCountpropertytoreturnthenumberofobjectsintheListObjectscollection.UsingtheApplicationandParentpropertieswillreturntheSpreadsheetcomponentandtheparentobject(whichistheWorksheetobject)forthespecifiedListObjectscollection.
![Page 60: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/60.jpg)
ListRowsCollection
ListObject ListRowsMultipleobjects
![Page 61: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/61.jpg)
UsingtheListRowsCollectionTheListRowscollectionisacollectionofalltheListRowobjectsinaListObjectobject.AListObjectobjectrepresentsanXMLlistinaSpreadsheetcomponent.TheListRowobjectisamemberoftheListRowscollection.
IndividualListRowobjectsintheListRowscollectionareindexedbeginningwith1forthefirstobject,2forthesecondobject,andsoforth.YouusetheItempropertytoreturnasingleListRowobjectfromtheListRowscollection.TheargumentfortheItempropertyistheindexnumberintheListRowscollectionoftheListRowobject.
YoucreateanewrowintheListRowscollectionbypromotingthecellsintheinsertrowtoan"official"row.Todothis,youusetheAddmethod,whichreturnsaListRowobjectrepresentingthenewlycreatedrow.ThenewrowwillbeaddedtothebottomoftheXMLlist.
Youusetheread-onlyCountpropertytoreturnthenumberofobjectsintheListRowscollection.TheApplicationandParentpropertiesreturntheSpreadsheetcomponentandtheparentobject(whichistheListObjectobject)forthespecifiedListRowsobject.
![Page 62: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/62.jpg)
LookupRelationshipsCollectionObject
PageRowsource LookupRelationshipsPageRelationshipMultipleobjects
RepresentsthecollectionofPageRelationshipobjectsthatdefinealookupjoinrelationshipwithapagerowsource.Intheobjectdiagramshowninthistopic,thefirstPageRowsourceobject(abovetheLookupRelationshipscollection)istheobjectonthe“many”sideoftheone-to-manyrelationshipandthePageRelationshipobject(belowthecollection)istheobjectonthe“one”side.
![Page 63: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/63.jpg)
UsingtheLookupRelationshipsCollectionThePageRowsourceobject'sLookupRelationshipspropertyreturnsaLookupRelationshipscollection.
![Page 64: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/64.jpg)
LookupSchemaRelationshipsCollectionObject
SchemaRowsource LookupSchemaRelationshipsSchemaRelationshipSchemaRelatedFields
RepresentsthecollectionofSchemaRelationshipobjectsforwhichasingleschemarowsourceactsasthe“many”sideoftheone-to-manyrelationship.
![Page 65: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/65.jpg)
UsingtheLookupSchemaRelationshipsCollectionTheSchemaRowsourceobject'sLookupSchemaRelationshipspropertyreturnsaLookupSchemaRelationshipscollection.
![Page 66: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/66.jpg)
NamesCollection
Multipleobjects NamesNameRange
AcollectionofalltheNameobjectsintheworkbook.EachNameobjectcanrepresentadefinednameforarangeofcells,aformula,oraconstantsvalue.
![Page 67: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/67.jpg)
UsingtheNamescollectionUsetheNamespropertytoreturntheNamescollection.Thefollowingexamplecreatesalistofallthenamesintheactiveworkbook,alongwiththeaddressestowhichtheyrefer.
SubList_All_Names()DimnmCurrentNameDimrngCurrent
SetrngCurrent=Spreadsheet1.ActiveSheet.Range("A1")
'Loopthroughallofthenamesintheactiveworkbook.ForEachnmCurrentNameInSpreadsheet1.ActiveWorkbook.Names
'Writethecurrentnametotheworksheet.rngCurrent.Value=nmCurrentName.Name
'Writethedefinitionofthecurrentnametotheworksheet.rngCurrent.Offset(0,1).Value="'"&nmCurrentName.RefersTo
SetrngCurrent=rngCurrent.Offset(1,0)NextEndSub
UsetheAddmethodtocreateanameandaddittothecollection.ThefollowingexamplecreatesanewnamethatreferstocellsA1:C20ontheworksheetnamed"Sheet1."
Spreadsheet1.Names.Add"CurrentMonth","=Sheet1!$A$1:$C$20"
TheRefersToargumentmustbespecifiedinA1-stylenotation,including
![Page 68: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/68.jpg)
dollarsigns($)whereappropriate.Forexample,ifcellA10isselectedonSheet1andyoudefineanamebyusingtheRefersToargument"=Sheet1!A1:B1",thenewnameactuallyreferstocellsA10:B10(becauseyouspecifiedarelativereference).Tospecifyanabsolutereference,use"=Sheet1!$A$1:$B$1".
![Page 69: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/69.jpg)
OCCommandsObject
Multipleobjects OCCommandsOCCommand
ContainsacollectionofOCCommandobjectsthatrepresentthecollectionofalloftheuserinterfaceandkeyboardcommandsthatareavailableinthespecifiedMicrosoftOfficeWebComponent.
![Page 70: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/70.jpg)
UsingtheOCCommandsobjectThefollowingpropertiesreturnaOCCommandscollection:
TheChartSpaceobject'sCommandsproperty.
ThePivotTableobject'sCommandsproperty.
TheSpreadsheetobject'sCommandsproperty.
TheOCCommandId,ChartCommandIdEnum,PivotCommandId,andSpreadsheetCommandIdconstantscontainlistsofthesupportedcommandsforeachWebcomponent.
UsetheItempropertytoreturnasingleOCCommandobject.
![Page 71: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/71.jpg)
PageFieldsCollectionObject
Multipleobjects PageFieldsPageFieldMultipleobjects
ThecollectionofPageFieldobjectsdescribingthefieldsthatwillbepresentintherecordsetproducedbythespecifiedrecordsetdefinition.Thesefieldsareacombinationofoutputfieldsfromthepagerowsourcesthatmakeupthisrecordsetdefinitionandotherpagefieldsthatareaddedtothiscollection.Sequencewithinthiscollectionisunimportantbecauseallcontrolsbindbynameratherthanbytheirordinalrelationshiptofieldsintheoutputrecordset.
![Page 72: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/72.jpg)
UsingthePageFieldsCollectionObjectTheRecordsetDef,PageRowSource,andGroupingDefobjects'PageFieldspropertyreturnsaPageFieldscollection.
![Page 73: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/73.jpg)
PageRelatedFieldsCollectionObject
PageRelationship PageRelatedFieldsPageRelatedFieldPageField
ThecollectionofPageRelatedFieldobjectsthatbelongtoagivenrecordsetdefinition.ThiscollectionisautomaticallyfilledwhenarecordsetdefinitionbasedontheSchemaRelatedFieldscollectioniscreated.
![Page 74: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/74.jpg)
UsingthePageRelatedFieldsCollectionThePageRelationshipobject'sPageRelatedFieldspropertyreturnsaPageRelatedFieldscollection.
![Page 75: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/75.jpg)
PageRowsourcesCollectionObject
RecordsetDef PageRowsourcesPageRowsourceMultipleobjects
ThecollectionofPageRowsourceobjectsinthedatamodel.
![Page 76: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/76.jpg)
UsingthePageRowsourcesCollectionObjectTheRecordsetDefobject'sPageRowsourcespropertyreturnsaPageRowsourcescollection.
![Page 77: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/77.jpg)
PanesCollectionObject
Window PanesMultipleobjects
ThecollectionofPaneobjectsforaworksheet.
![Page 78: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/78.jpg)
UsingthePanesCollectionTheWindowobject’sPanespropertyreturnsaPanescollection.
![Page 79: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/79.jpg)
ParameterValuesCollectionObject
RecordsetDef ParameterValuesParameterValue
ThecollectionofParameterValueobjectsforarecordsetdefinition.
![Page 80: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/80.jpg)
UsingtheParameterValuesCollectionTheRecordsetDefobject'sParameterValuespropertyreturnsaParameterValuescollection.
![Page 81: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/81.jpg)
PivotAggregatesCollectionObject
PivotCell PivotAggregatesPivotAggregateMultipleobjects
ThecollectionofPivotAggregateobjectsforthespecifiedcell.
![Page 82: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/82.jpg)
UsingthePivotAggregatesCollectionThePivotCellobject’sAggregatespropertyreturnsanobjectfromthePivotAggregatescollection.
![Page 83: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/83.jpg)
PivotAxisMembersCollection
Multipleobjects PivotAxisMembersPivotAxisMemberMultipleobjects
AcollectionofPivotAxisMemberobjects.
![Page 84: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/84.jpg)
UsingthePivotAxisMemberscollectionUsetheItempropertyofthePivotAxisMemberscollectiontoreturnaPivotAxisMemberobject.
![Page 85: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/85.jpg)
PivotColumnMembersCollection
Multipleobjects PivotColumnMembersPivotColumnMemberMultipleobjects
AcollectionofPivotColumnMemberobjects.
![Page 86: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/86.jpg)
UsingthePivotColumnMembersCollectionUsetheItempropertyofthePivotColumnMemberscollectiontoreturnaPivotColumnMemberobject.
![Page 87: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/87.jpg)
PivotFieldsCollectionObject
Multipleobjects PivotFieldsPivotFieldMultipleobjects
ThecollectionofPivotFieldobjectsinthespecifiedfieldset.
![Page 88: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/88.jpg)
UsingthePivotFieldsCollectionUsetheFieldspropertyofthefollowingobjectstoreturnaPivotFieldscollection:PivotDetailRange,PivotFieldSet,PivotResultColumnAxis,PivotResultDataAxis,PivotResultGroupAxis,PivotResultPageAxis,orPivotResultRowAxis.
![Page 89: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/89.jpg)
PivotFieldSetsCollectionObject
Multipleobjects PivotFieldSetsPivotFieldSetMultipleobjects
ThecollectionofPivotFieldSetobjectsonthespecifiedaxisorinthespecifiedview.
![Page 90: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/90.jpg)
UsingthePivotFieldSetsCollectionThefollowingpropertiesreturnanobjectfromthePivotFieldSetscollection:
ThePivotAxisobject’sFieldSetsproperty
ThePivotDataAxisobject’sFieldSetsproperty
ThePivotFilterAxisobject’sFieldSetsproperty
ThePivotGroupAxisobject’sFieldSetsproperty
ThePivotResultFilterAxisobject'sFieldSetsproperty
ThePivotViewobject’sFieldSetsproperty
![Page 91: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/91.jpg)
PivotMemberPropertiesCollection
PivotField PivotMemberPropertiesPivotMemberProperty
AcollectionofPivotMemberPropertyobjects.
![Page 92: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/92.jpg)
UsingthePivotMemberPropertiescollectionUsetheItempropertyofthePivotMemberPropertiescollectiontoreturnaPivotMemberPropertyobject.
![Page 93: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/93.jpg)
PivotMembersCollectionObject
Multipleobjects PivotMembersPivotMemberMultipleobjects
AcollectionofPivotMemberobjects.
![Page 94: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/94.jpg)
UsingthePivotMembersCollectionThefollowingpropertiesreturnanobjectfromthePivotMemberscollection:
TheChildMemberspropertyofthefollowingobjects:PivotAxisMember,PivotColumnMember,PivotMember,PivotPageMember,orPivotRowMember
ThePivotFieldobject’sCustomGroupMembersproperty
![Page 95: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/95.jpg)
PivotPageMembersCollection
PivotPageMember PivotPageMembersPivotPageMemberMultipleobjects
AcollectionofPivotPageMemberobjects.
![Page 96: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/96.jpg)
UsingthePivotPageMembersCollectionUsetheItempropertyofthePivotPageMemberscollectiontoreturnaPivotPageMemberobject.
![Page 97: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/97.jpg)
PivotResultGroupFieldsCollection
Multipleobjects PivotResultGroupFieldsPivotResultGroupFieldMultipleobjects
AcollectionofPivotResultGroupFieldobjects.
![Page 98: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/98.jpg)
UsingthePivotResultGroupFieldscollectionThefollowingpropertiesreturnaPivotResultGroupFieldscollection:
ThePivotResultColumnAxisobject'sGroupFieldsproperty.
ThePivotResultGroupAxisobject'sGroupFieldsproperty.
ThePivotResultPageAxisobject'sGroupFieldsproperty.
ThePivotResultRowAxisobject'sGroupFieldsproperty.
![Page 99: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/99.jpg)
PivotResultMemberPropertiesCollection
Multipleobjects PivotResultMemberPropertiesPivotResultMemberPropertyPivotMemberProperty
Thecollectionofmemberpropertiesforaresultmember.
![Page 100: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/100.jpg)
UsingthePivotResultMemberPropertiescollectionThefollowingpropertiesreturnaPivotResultMemberPropertiescollection:
ThePivotAxisMemberobject'sMemberPropertiesproperty.
ThePivotColumnMemberobject'sMemberPropertiesproperty.
ThePivotPageMemberobject'sMemberPropertiesproperty.
ThePivotRowMemberobject'sMemberPropertiesproperty.
![Page 101: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/101.jpg)
PivotRowMembersCollection
Multipleobjects PivotRowMembersPivotRowMemberMultipleobjects
AcollectionofPivotRowMemberobjects.
![Page 102: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/102.jpg)
UsingthePivotRowMembersCollectionUsetheItempropertyofthePivotRowMemberscollectiontoreturnaPivotRowMemberobject.
![Page 103: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/103.jpg)
PivotTotalsCollectionObject
Multipleobjects PivotTotalsPivotTotalMultipleobjects
ThecollectionofPivotTotalobjectsonthespecifieddataaxisorinthespecifiedview.
![Page 104: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/104.jpg)
UsingthePivotTotalsCollectionThePivotDataAxis,PivotResultDataAxis,andPivotViewobjects'TotalspropertyreturnsaPivotTotalscollection.
![Page 105: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/105.jpg)
RecordsetDefsCollectionObject
Multipleobjects RecordsetDefsRecordsetDefMultipleobjects
ThecollectionofRecordsetDefobjectsforthespecifieddatasourcecontrol.
![Page 106: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/106.jpg)
UsingtheRecordsetDefsCollectionTheDataSourceControlobject'sRecordsetDefspropertyreturnaRecordsetDefscollection.
![Page 107: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/107.jpg)
SchemaFieldsCollectionObject
SchemaRowsource SchemaFieldsSchemaFieldSchemaProperties
ThecollectionofallavailableSchemaFieldobjectsinaschemarowsource.
![Page 108: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/108.jpg)
UsingtheSchemaFieldsCollectionTheSchemaRowsourceobject'sSchemaFieldspropertyreturnsaSchemaFieldscollection.
![Page 109: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/109.jpg)
SchemaParametersCollectionObject
SchemaRowsource SchemaParametersSchemaParameterSchemaProperties
ThecollectionofSchemaParameterobjectsforthespecifiedschemarowsource.
![Page 110: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/110.jpg)
UsingtheSchemaParametersCollectionTheSchemaRowsourceobject'sSchemaParameterspropertyreturnsaSchemaParameterscollection.
![Page 111: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/111.jpg)
SchemaRelationshipsCollectionObject
Multipleobjects SchemaRelationshipsSchemaRelationshipSchemaRelatedFields
ThecollectionofSchemaRelationshipobjectsforadatasourcecontrol.
![Page 112: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/112.jpg)
UsingtheSchemaRelationshipsCollectionTheDataSourceControlobject'sSchemaRelationshipspropertyreturnsaSchemaRelationshipscollection.
![Page 113: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/113.jpg)
SchemaRowsourcesCollectionObject
Multipleobjects SchemaRowsourcesSchemaRowsourceMultipleobjects
ThecollectionofSchemaRowsourceobjectsforthespecifieddatasourcecontrol.Thiscollectionisautomaticallyrepopulatedwithobjectsinthedatabasewheneverthedatabaseisopened.
![Page 114: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/114.jpg)
UsingtheSchemaRowsourcesCollectionTheDataSourceControlobject'sSchemaRowsourcespropertyreturnsaSchemaRowsourcescollection.
![Page 115: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/115.jpg)
SheetsCollection
Multipleobjects SheetsWorkbook
AcollectionofalltheWorksheetobjectsintheworkbook.EachWorksheetobjectrepresentsaworksheet.
![Page 116: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/116.jpg)
UsingtheSheetscollectionThefollowingpropertiesreturnaSheetscollection.
TheSpreadsheetobject'sSheetsproperty.
TheWindowobject'sSelectedSheetsproperty.
TheWorkbookobject'sSheetsproperty.
![Page 117: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/117.jpg)
SublistRelationshipsCollectionObject
RecordsetDef SublistRelationshipsPageRelationshipMultipleobjects
ThecollectionofPageRelationshipobjectsoftypedscSublistthatallhavethesamerecordsetdefinitionastheir“one”side(parent)ofaone-to-manyrelationship.Recordsinthechildofasublistrelationshipareretrievedonlywhentheyareneeded.
![Page 118: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/118.jpg)
UsingtheSublistRelationshipsCollectionTheRecordsetDefobject'sSublistRelationshipspropertyreturnsaSublistRelationshipscollection.
![Page 119: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/119.jpg)
SublistSchemaRelationshipsCollectionObject
SchemaRowsource SublistSchemaRelationshipsSchemaRelationshipSchemaRelatedFields
ThecollectionofSchemaRelationshipobjectsthatallhavethesameschemarowsourceastheir“one”side(fromaone-to-manyrelationship).
![Page 120: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/120.jpg)
UsingtheSublistSchemaRelationshipsCollectionTheSchemaRowsourceobject'sSublistSchemaRelationshipspropertyreturnsaSublistSchemaRelationshipscollection.
![Page 121: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/121.jpg)
WindowsCollectionObject
Multipleobjects WindowsWindowMultipleobjects
AcollectionofalltheWindowobjectsintheSpreadsheetcontrol.TheWindowscollectionfortheSpreadsheetobjectcontainsallthewindowsintheapplication,whereastheWindowscollectionfortheWorkbookobjectcontainsonlythewindowsinthespecifiedworkbook.Inbothcases,theSpreadsheetobjectcontainsonlyoneWindowobject.Thisobjectrepresentsthewindowforactivesheetwithintheworkbook.
EachsheethasadistinctWindowobjectassociatedwithit.Application.ActiveWindoworApplication.Workbooks(1).Windows(1)alwaysreturnsapointertotheactivesheet'swindow.ThereisnoActiveSheet.WindoworSheets(i).Window.
![Page 122: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/122.jpg)
UsingtheWindowsCollectionObjectThefollowingpropertiesreturnaWindowscollection.
TheSpreadsheetobject'sWindowsproperty
TheWorkbookobject'sWindowsproperty.
![Page 123: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/123.jpg)
WorkbooksCollection
Multipleobjects WorkbooksMultipleobjects
AcollectioncontainingtheWorkbookobjectthatisopeninthespreadsheetcontrol.Thespreadsheetcontrolsupportsonlyoneopenworkbook.
![Page 124: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/124.jpg)
UsingtheWorkbookscollectionUsetheActiveWorkbookpropertytorefertotheworkbookthatiscurrentlyopeninthespreadsheetcontrol.
![Page 125: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/125.jpg)
WorksheetsCollectionObject
Multipleobjects WorksheetsWorkbook
AcollectionofalltheWorksheetobjectsintheworkbook.EachWorksheetobjectrepresentsaworksheet.
![Page 126: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/126.jpg)
UsingtheWorksheetsCollectionObjectUsetheWorksheetspropertyofSpreadsheetorWorkbookobjecttoreturntheWorksheetscollection.
UsetheAddmethodtocreateanewworksheetandaddittothecollection.ThefollowingexampleaddstwonewworksheetsbeforesheetoneofSpreadsheet1.
Spreadsheet1.Worksheets.Add_Spreadsheet1.Worksheets(1),,2
UseWorksheets(index),whereindexistheworksheetindexnumberorname,toreturnasingleWorksheetobject.ThefollowingexamplehidesworksheetoneintheSpreadsheet1.
Spreadsheet1.Worksheets(1).Visible=False
TheWorksheetobjectisalsoamemberoftheSheetscollection.
![Page 127: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/127.jpg)
XmlDataBindingsCollection
Workbook XmlDataBindingsWorkbook
TheXmlDataBindingscollectioncontainsalloftheXmlDataBindingobjectsassociatedwithaSpreadsheetcomponent.EachXmlDataBindingobjectcontainsconfigurationdatathatbindstheSpreadsheetcomponenttoadataretrievalservice,SOAPWebService,XMLfile,oraWebPart.
![Page 128: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/128.jpg)
UsingtheXmlDataBindingsCollectionTheXMLDataBindingobjectisamemberoftheXmlDataBindingscollection,whichisacollectionofalloftheXmlDataBindingobjectsinaSpreadsheetcomponent.Withinthecollection,individualXmlDataBindingobjectsareindexedbeginningwith1forthefirstobject,2forthesecond,andsoon.YoucanreturnaXmlDataBindingobjectfromtheXmlDataBindingscollectionbyusingtheItempropertyofthecollection.TheargumentfortheItempropertyistheindexinthecollectionoftheobjectyouwanttoreturnorthebindingIDoftheobject.ThebindingIDisthevalueoftheIDattributeintheXMLthatrepresentsthebinding.YoucanfindthisintheXMLSpreadsheetfilefortheSpreadsheetcomponent(orSpreadsheetWebPart)orbyexaminingtheBindingDatapropertyoftheXmlDataBindingobject.YoucancreateanXMLSpreadsheetfilebycreatingadataboundspreadsheetusingMicrosoftExcelandthensavingtheworkbookasanXMLSpreadsheet.
YoucreateanewXmlDataBindingobjectusingtheAddmethodoftheXmlDataBindingscollection.OnceyouhavecreatedtheXmlDataBindingobject,youcanuseitsBindingDatapropertytospecifybindingconfigurationinformationandyoucanusetheXmlMappropertytospecifytheschemamapassociatedwiththebinding.
ThefollowingexamplecreatestheXmlDataBindingsobjectusingtheXmlDataBindingspropertyoftheWorkbookobjectandshowshowtoworkwiththebindinginformation:
DimobjBindingsDimobjBindingDimstrBindingInfo
SetobjBindings=Spreadsheet1.ActiveWorkbook.XmlDataBindings
ForEachobjBindinginobjBindings
![Page 129: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/129.jpg)
'SavetheXMLbindinginformationtoavariable.strBindingInfo=objBinding.BindingData'Workwiththebindinginformationhere.Next
![Page 130: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/130.jpg)
XmlMapsCollection
Workbook XmlMapsWorkbook
TheXmlMapscollectionisacollectionofalloftheXmlMapobjectsassociatedwithaSpreadsheetcomponent.AnXmlMapobjectisanXMLschemamapthatspecifieshowtomapdatafromadatasourcetotheSpreadsheetcomponent.
![Page 131: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/131.jpg)
UsingtheXmlMapsCollectionIntheXmlMapscollection,individualXmlMapobjectsareindexedbeginningwith1forthefirstobject,2forthesecondobject,andsoon.YoureturnaXmlMapobjectfromtheXmlMapscollectionusingtheItemproperty.TheargumentfortheItempropertyistheindexinthecollectionoftheobjectyouwanttoreturnorthemapIDoftheobject.ThemapIDisthevalueoftheIDattributeintheXMLthatrepresentsthemap.YoucanfindthisintheXMLSpreadsheetfileforthepartorbyexaminingtheMapDatapropertyoftheXmlMapobject.YoucancreateanXMLSpreadsheetfilebycreatingadata-boundspreadsheetinMicrosoftExcelandthensavingtheworkbookasanXMLSpreadsheet.YoucancreateanewXmlMapobjectbyusingtheAddmethodoftheXmlMapscollection.
ThefollowingexampleusestheXmlMapspropertytoreturntheXmlMapscollectionobject:
DimobjMapsDimobjMapDimstrMapInfo
SetobjMaps=Spreadsheet1.ActiveWorkbook.XmlMaps
ForEachobjMapinobjMaps'SavetheXMLmapinformationtoavariable.strMapInfo=objMap.MapData'Workwiththemapinformationhere.Next
![Page 132: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/132.jpg)
AutoFilterObject
Multipleobjects AutoFilterMultipleobjects
RepresentstheAutoFiltercontainer.TheAutoFilterobjectcontainsaRangecollectionandaFilterscollection.
![Page 133: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/133.jpg)
UsingtheAutoFilterObjectTheWorksheetobject’sAutoFilterpropertyreturnstheAutoFilterobjectforthespecifiedworksheet.
![Page 134: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/134.jpg)
BorderObject
Range BordersBorderRange
Representstheborderofanobject.
TheBorderobjectisamemberoftheBorderscollection.
![Page 135: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/135.jpg)
UsingtheBorderObjectTheBorderscollection’sItempropertyreturnsaBorderobject.
![Page 136: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/136.jpg)
ByRefObject
ByRef
Containsthevalueofaneventparameter.
![Page 137: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/137.jpg)
UsingtheByRefobjectSomeeventsreturnorsetvaluesthroughparametersthataretypedasByRefobjects.WhenaneventparameteristypedasaByRefobject,usetheValuepropertyoftheparametertoreturnorsettheparameter.
ThefollowingeventparametersreturnorsetvaluesthroughaByRefobject:
TheBeforeContextMenuevent'sMenuandCancelparameters
TheBeforeKeyDownevent'sCancelparameter
TheBeforeKeyPressevent'sCancelparameter
TheBeforeKeyUpevent'sCancelparameter
TheBeforeRenderevent'sCancelparameter
TheCommandBeforeExecuteevent'sCancelparameter
TheCommandCheckedevent'sCheckedparameter
TheCommandEnabledevent'sEnabledparameter
TheCommandTipTextevent'sCaptionparameter
TheEndEditevent'sFinalValue,Cancel,andErrorDescriptionparameters
TheStartEditevent'sInitialValue,Cancel,andErrorDescriptionparameters(Spreadsheet)
TheStartEditevent'sInitialValue,ArrowMode,CaretPosition,Cancel,andErrorDescriptionparameters(PivotTable)
![Page 138: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/138.jpg)
ChartSpaceObject
ChartSpace Multipleobjects
Representsthechartworkspace.Thechartworkspaceisthetop-levelchartcontainer;itcancontainmorethanonechart,witheachchartrepresentedbyaChChartobject.Whenachartworkspaceisfirstcreated,itisempty(itdoesnotcontainanycharts).UsetheAddmethodoftheChChartsobjecttocreateanewchart.
![Page 139: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/139.jpg)
UsingtheChartSpaceObjectYoucanuseeithertheCreateObjectmethodortheNewkeywordtocreateanewChartSpaceobject.
TheobjectIDforachartcontrolonanHTMLpageoraVisualBasicformreturnsaChartSpaceobject.
TheprogrammaticidentifierfortheChartSpaceobjectisCLSID:0002E55D-0000-0000-C000-000000000046.Thefollowingexamplecreatesachartworkspacenamed"ChartSpace1"onanHTMLpage.
<objectid=ChartSpace1classid=CLSID:0002E55D-0000-0000-C000-000000000046style="width:100%;height:350"></object>
![Page 140: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/140.jpg)
ChAxisObject
Multipleobjects ChAxisMultipleobjects
Representsasingleaxisonachart.Achartcanhaveuptosixteenaxes.TheChAxisobjectisamemberoftheChAxescollection.
![Page 141: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/141.jpg)
UsingtheChAxisobjectUsetheChAxesobject’sAddmethodtoaddanaxistoachart.
ThefollowingpropertiesandmethodsreturnaChAxisobject.
TheChAxesobject’sAddmethod
TheChAxesobject’sItemproperty
TheChAxisobject’sCrossingAxisproperty
TheChGridlinesobject’sParentproperty
![Page 142: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/142.jpg)
ChBorderObject
Multipleobjects ChBorder
Representstheborderofanobjectonachart.
![Page 143: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/143.jpg)
UsingtheChBorderobjectThefollowingpropertiesreturnaChBorderobject:
TheChChartobject'sBorderproperty
TheChChartDrawobject'sBorderproperty
TheChDataLabelobject'sBorderproperty
TheChDataLabelsobject'sBorderproperty
TheChDropZoneobject'sButtonBorderproperty
TheChDropZoneobject'sWatermarkBorderproperty
TheChLegendobject'sBorderproperty
TheChPlotAreaobject'sBorderproperty
TheChPointobject'sBorderproperty
TheChSegmentBoundaryobject'sBorderproperty
TheChSeriesobject'sBorderproperty
TheChSurfaceobject'sBorderproperty
TheChTitleobject'sBorderproperty
UsetheColor,DashStyle,andWeightpropertiestosettheattributesofaborder.ThefollowingexamplesetsborderpropertiesforthelegendofChartSpace1.
SubFormat_Chartspace_Legend()
DimChartLegendDimchConstants
SetchConstants=ChartSpace1.Constants
'Setavariabletothelegendforthechartspace.
![Page 144: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/144.jpg)
SetChartLegend=ChartSpace1.ChartSpaceLegend
'Setthelegendcolor.ChartLegend.Border.Color="Blue"
'Setthelineweightforthelegend.ChartLegend.Border.Weight=chConstants.owcLineWeightThick
'Setthelinestyleforthelegend.ChartLegend.Border.DashStyle=chLineRoundDot
EndSub
![Page 145: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/145.jpg)
ChCategoryLabelObject
Multipleobjects ChCategoryLabelMultipleobjects
RepresentsasinglelabelinaChCategoryLabelscollection.
![Page 146: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/146.jpg)
UsingtheChCategoryLabelobjectYoucanusethefollowingpropertiestoreturnaChCategoryLabelobject:
TheItempropertyoftheChCategoryLabelscollection
TheParentLabelpropertyoftheChCategoryLabelobject
![Page 147: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/147.jpg)
ChChartObject
Multipleobjects ChChartMultipleobjects
Representsasinglechartinthechartworkspace.Thechartworkspacecancontainupto16charts.TheChChartobjectisamemberoftheChChartscollection.
UsingtheChChartObject
UsetheChChartscollectionobject’sAddmethodtoaddacharttothechartworkspace:
ThefollowingpropertiesandmethodsreturnaChChartobject.
TheChAxesobject’sParentproperty
TheChAxisobject’sParentproperty
TheChChartsobject’sAddmethod
TheChChartsobject’sItemproperty
TheChPlotAreaobject’sParentproperty
TheChSeriesobject’sParentproperty
TheChSeriesCollectionobject’sParentproperty
![Page 148: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/148.jpg)
ChChartDrawObject
ChChartDraw Multipleobjects
Canbeusedtodrawitemsonachart,suchasaline,rectangle,orellipse.
![Page 149: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/149.jpg)
UsingtheChChartDrawobjectTheDrawEllipse,DrawLine,DrawPolyLine,DrawPolygon,DrawLinemethodscanbeusedtoadddrawingobjectstoachart.TheDrawTextmethodcanbeusedtoaddtexttoachart.TheBorder,Font,Interior,andLinepropertiescanbeusedtoformateachdrawingobjectbeforeitisaddedtothechart.
Youmustutilizeoneormoreofthefollowingeventstoaddadrawingobjecttoachart:BeforeRender,AfterRender,orAfterFinalRender.
![Page 150: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/150.jpg)
ChChartFieldObject
ChDropZone ChChartFieldsChChartFieldChDropZone
Representsafieldinadropzone.
![Page 151: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/151.jpg)
UsingtheChChartFieldobjectTheChChartFieldsobject'sItempropertyreturnsaChChartFieldobject.
Accessingthisobjectwhenyourchartisboundtoliteraldatawillresultinarun-timeerror.
![Page 152: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/152.jpg)
UnsupportedLanguageElementYouhaverequestedHelpforalanguageelementthatisnotsupported.
![Page 153: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/153.jpg)
ChDataLabelObject
Multipleobjects ChDataLabelMultipleobjects
Representsasingledatalabelforaseries,orthesingledatalabelforatrendline.
![Page 154: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/154.jpg)
UsingtheChDataLabelobjectThefollowingpropertiescanbeusedtoreturnaChDataLabelobject:
TheChDataLabelsobject'sItemproperty
TheChTrendlineobject'sDataLabelproperty
ThefollowingexampleaddsdatalabelstothefirstseriesinthefirstchartinChartspace1,andthenformatsthethirddatalabel.
SubFormatSeriesLabel()
DimserSeries1DimdlSeries1Labels
'Setavariabletothefirstseriesofthefirstchart'inChartspace1.SetserSeries1=ChartSpace1.Charts(0).SeriesCollection(0)
'Addasetofdatalabelstothefirstseriesandreturn'aDataLabelsobject.SetdlSeries1Labels=serSeries1.DataLabelsCollection.Add
dlSeries1Labels.Item(2).Font.Bold=TruedlSeries1Labels.Item(2).Font.Color="Red"
EndSub
![Page 155: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/155.jpg)
ChDataLabelsObject
Multipleobjects ChDataLabelsMultipleobjects
ContainsacollectionofChDataLabelobjectsthatrepresentallthedatalabelsinthespecifiedsetofdatalabelsforaseries.Notethataseriescancontainmorethanonesetofdatalabels.
![Page 156: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/156.jpg)
UsingtheChDataLabelsobjectThefollowingmethodsandpropertiescanbeusedtoreturnaChDataLabelsobject:
TheChDataLabelsCollectioncollectionobject'sAddmethod.
TheChDataLabelsCollectioncollectionobject'sItemproperty.
ThefollowingexampleaddsdatalabelstothefirstseriesinthefirstchartinChartspace1andthenformatsthedatalabels.
SubAddDataLabels()
DimserSeries1DimdlSeries1Labels
'Setavariabletothefirstseriesofthefirstchart'inChartspace1.SetserSeries1=ChartSpace1.Charts(0).SeriesCollection(0)
'Addasetofdatalabelstothefirstseriesandreturn'aDataLabelsobject.SetdlSeries1Labels=serSeries1.DataLabelsCollection.Add
'Setthenumberformatofthedatalabels.dlSeries1Labels.NumberFormat="0.00"
'Setthedatalabelstodisplaythecategory'nameforthedatapoint.dlSeries1Labels.HasCategoryName=True
'Setthedatalabelstodisplaythevalue'forthedatapoint.dlSeries1Labels.HasValue=True
![Page 157: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/157.jpg)
EndSub
![Page 158: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/158.jpg)
ChDropZoneObject
Multipleobjects ChDropZoneMultipleobjects
Representsadropzoneonchartsthatareboundtoarelationaldatasource.
![Page 159: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/159.jpg)
UsingtheChDropZoneobjectTheChartSpaceobject'sDropZonesmethodreturnsaChDropZoneobject.
ThefollowingexampleformatsthebuttonandthewatermarkoftheseriesdropzoneinChartspace1.
SubSetup_DropZone()
DimdzSeriesDropZoneDimChConstants
SetchConstants=Chartspace1.Constants
'SetavariabletotheseriesdropzoneinChartspace1.SetdzSeriesDropZone=ChartSpace1.DropZones(chConstants.chDropZoneSeries)
'Thenextthreelinesofcodeformatthebuttonofthedropzone.dzSeriesDropZone.ButtonBorder.Weight=chConstants.owcLineWeightMediumdzSeriesDropZone.ButtonInterior.SetSolid"Red"dzSeriesDropZone.ButtonFont.Size=14
'Thenextthreelinesofcodeformatthewatermarkofthedropzone.dzSeriesDropZone.WatermarkBorder.Color="Red"dzSeriesDropZone.WatermarkFont.Color="Red"dzSeriesDropZone.WatermarkInterior.SetSolid"Green"
EndSub
![Page 160: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/160.jpg)
ChErrorBarsObject
ChSeries ChErrorBarsCollectionChErrorBarsMultipleobjects
Representstheerrorbarsforaseries.Errorbarsindicatethedegreeofuncertaintyforchartdata.OnlyseriesinRadar,Polar,Area,Bar,Column,Line,andXY(Scatter)chartscanhaveerrorbars.Onlyseriesinscatterchartscanhavexandyerrorbars.TheChErrorBarsobjectisnotacollection.Thereisnoobjectthatrepresentsasingleerrorbar;youeitherhavexerrorbarsoryerrorbarsturnedonforallpointsinaseriesoryouhavethemturnedoff.
![Page 161: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/161.jpg)
UsingtheChErrorBarsobjectUsetheAddmethodoftheChErrorBarsCollectionobjecttoadderrorbarstoaseries.
ThefollowingmethodsreturnaChErrorBarsobject.Formoreinformation,seetheHelptopicsforthesemethods:
TheChErrorBarsCollectionobject’sAddmethod
TheChErrorBarsCollectionobject’sItemproperty
ThefollowingexampleaddserrorbarstothefirstseriesinthefirstchartinChartSpace1,andthensetsthepropertiesfortheerrorbars.
SubAddErrorBars()
DimchConstantsDimebCollectionDimebSeries1
SetchConstants=ChartSpace1.Constants
'Setavariabletothecollectionoferrorbarsfor'thefirstseriesinthefirstchartofChartspace1.SetebCollection=ChartSpace1.Charts(0).SeriesCollection(0).ErrorBarsCollection
'Adderrorbarstothechart.ebCollection.Add
'Setavariabletotheerrorbarsforthedataseries.SetebSeries1=ebCollection.Item(0)
'Settheerrorbarssothattheyrepresentacertain'percentageofthevalueofadatapoint.
![Page 162: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/162.jpg)
ebSeries1.Type=chConstants.chErrorBarTypePercent
'Theerrorbarsrepresent5%ofadatapoint.ebSeries1.Amount=0.05
EndSub
![Page 163: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/163.jpg)
ChFontObject
Multipleobjects ChFont
Containsthefontattributes(fontname,fontsize,color,andsoon)foranobjectonachart.
![Page 164: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/164.jpg)
UsingtheChFontobjectThefollowingpropertiescanbeusedtoreturnaChFontobject:
TheChAxisobject'sFontproperty
TheChChartDrawobject'sFontproperty
TheChDataLabelobject'sFontproperty
TheChDataLabelsobject'sFontproperty
TheChDropZoneobject'sButtonFontproperty
TheChDropZoneobject'sWatermarkFontproperty
TheChLegendobject'sFontproperty
TheChLegendEntryobject'sFontproperty
TheChTitleobject'sFontproperty
UsetheNamepropertytosetthefontforaparticularobject.TheBold,Italic,Color,Underline,andSizepropertiescanbeusedtofurtherformatthefontofaparticularobject.
![Page 165: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/165.jpg)
ChFormatMapObject
Multipleobjects ChFormatMapChSegments
TheChFormatMapobjectallowsformattingtorepresentarangeofdatavalues.TheChFormatMapobjectcanbeusedprovidevisualcuesthathighlightcertainportionsofyourdata.
![Page 166: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/166.jpg)
UsingtheChFormatMapobjectTheFormatMappropertyoftheChSeriesobjectreturnsaChFormatMapobject.
FormatmapscontainoneormoreChSegmentobjects,eachofwhichcanbeformattedindependently.
ThefollowingexamplebindsChartspace1totheOrderDetailstableintheSQLServerNorthwinddatabase.Then,aformatmapiscreated.Thesmallervaluesaredisplayedinwhite,thenlargervaluesaredisplayedinalightshadeofblue,andfinallythelargestvaluesinthechartaredisplayedindarkblue.
SubWindow_Onload()
DimserSeries1DimsegSegment1DimchConstants
SetchConstants=ChartSpace1.Constants
'ThefollowingtwolinesofcodebindChartspace1totheOrderDetailstableinthe'NorthwindSQLServerdatabase.ChartSpace1.ConnectionString="Provider=SQLOLEDB.1;PersistSecurityInfo=TRUE;"&_"IntegratedSecurity=SSPI;InitialCatalog=Northwind;"&_"DataSource=ServerName;"ChartSpace1.DataMember="OrderDetails"
'ThefollowingtwolinesofcodebindChartspace1totheQuantityandProductIDfields'intheOrderdetailstable.ChartSpace1.SetDatachConstants.chDimCategories,chConstants.chDataBound,"ProductID"ChartSpace1.SetDatachConstants.chDimValues,chConstants.chDataBound,"Quantity"
![Page 167: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/167.jpg)
'Createaformatmap.ChartSpace1.SetDatachConstants.chDimFormatValues,chConstants.chDataBound,"Quantity"
'SetavariabletothefirstseriesinthefirstchartinChartspace1.SetserSeries1=ChartSpace1.Charts(0).SeriesCollection(0)
'Addasegmenttotheformatmap.SetsegSegment1=serSeries1.FormatMap.Segments.Add
'Specifythatthedivisionsinformattingbecreatedautomatically.segSegment1.HasAutoDivisions=True
'Measurethesegmentboundariesbaseduponapercentage.segSegment1.Begin.ValueType=chConstants.chBoundaryValuePercentsegSegment1.End.ValueType=chConstants.chBoundaryValuePercent
'Setthebeginningvalueto0%,andtheendingvalueto100%.segSegment1.Begin.Value=0segSegment1.End.Value=1
'Formattheinteriorofthematchingvalues.segSegment1.Begin.Interior.Color="White"segSegment1.End.Interior.Color="Blue"
EndSub
ThefollowingexamplebindsChartspace1totheOrderDetailstableintheNorthwinddatabase.Then,twosegmentsarecreated.Thefirstsegmenthighlightsthelowest10%ofvaluesinthefirstseriesinthechart.Thesecondsegmenthighlightsthetop20%ofvaluesinthefirstseriesinthechart.
SubWindow_Onload()
![Page 168: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/168.jpg)
Dimserseries1DimsegBottom10PctDimsegTop20PctDimchConstants
SetchConstants=ChartSpace1.Constants
'ThefollowingtwolinesofcodebindChartspace1totheOrderDetailstableinthe'NorthwindSQLServerdatabase.ChartSpace1.ConnectionString="Provider=SQLOLEDB.1;PersistSecurityInfo=TRUE;"&_"IntegratedSecurity=SSPI;InitialCatalog=Northwind;"&_"DataSource=ServerName;"ChartSpace1.DataMember="OrderDetails"
'ThefollowingtwolinesofcodebindChartspace1totheQuantityandProductIDfields'intheOrderdetailstable.ChartSpace1.SetDatachConstants.chDimCategories,chConstants.chDataBound,"ProductID"ChartSpace1.SetDatachConstants.chDimValues,chConstants.chDataBound,"Quantity"
'Createaformatmap.ChartSpace1.SetDatachConstants.chDimFormatValues,chConstants.chDataBound,"Quantity"
'SetavariabletothefirstseriesinthefirstchartinChartspace1.Setserseries1=ChartSpace1.Charts(0).SeriesCollection(0)
'Addasegmenttotheformatmap.Thissegmentwill'representthebottom10%ofvaluesinthechart.SetsegBottom10Pct=serseries1.FormatMap.Segments.Add
'Measurethesegmentboundariesbaseduponapercentage.segBottom10Pct.Begin.ValueType=chConstants.chBoundaryValuePercentsegBottom10Pct.End.ValueType=chConstants.chBoundaryValuePercent
![Page 169: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/169.jpg)
'Setthebeginningvalueto0%,andtheendingvalueto10%.
segBottom10Pct.Begin.Value=0
segBottom10Pct.End.Value=0.1
'Formattheinteriorofthematchingvalues.segBottom10Pct.Begin.Interior.Color="red"segBottom10Pct.End.Interior.Color="red"
'Addasegmenttotheformatmap.Thissegmentwill'representthetop20%ofvaluesinthechart.SetsegTop20Pct=serseries1.FormatMap.Segments.Add
'Measurethesegmentboundariesbaseduponapercentage.segTop20Pct.Begin.ValueType=chConstants.chBoundaryValuePercentsegTop20Pct.End.ValueType=chConstants.chBoundaryValuePercent
'Setthebeginningvalueto80%,andtheendingvalueto100%.segTop20Pct.Begin.Value=0.8segTop20Pct.End.Value=1
'Formattheinteriorofthematchingvalues.segTop20Pct.Begin.Interior.Color="green"segTop20Pct.End.Interior.Color="green"
EndSub
![Page 170: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/170.jpg)
ChGridlinesObject
ChAxis ChGridlinesMultipleobjects
Representsmajororminorgridlinesonachartaxis.Youcannothavegridlineswithoutanaxis.Gridlinesextendthetickmarksonachartaxistomakeiteasiertoseethevaluesassociatedwiththedatamarkers.Thisobjectisnotacollection.Thereisnoobjectthatrepresentsasinglegridline;youeitherhaveallgridlinesforanaxisturnedonorallofthemturnedoff.
![Page 171: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/171.jpg)
UsingtheChGridlinesobjectThefollowingpropertiesreturnaChGridlinesobject.
TheChAxisobject’sMajorGridlinesproperty
TheChAxisobject’sMinorGridlinesproperty
ThefollowingexampleenablesthemajorandminorgridlinesforthevalueaxisinthefirstchartinChartspace1.Then,theweightofthegridlinesisformatted.
SubEnableGridlines()
DimchConstantsDimaxValueAxis
SetchConstants=ChartSpace1.Constants
'SetavariabletothevalueaxisinthefirstchartinChartspace1.SetaxValueAxis=ChartSpace1.Charts(0).Axes(chConstants.chAxisPositionValue)
'Thefollowingtwolinesofcodeturnonthemajorand'minorgridlinesforthevalueaxis.axValueAxis.HasMajorGridlines=TrueaxValueAxis.HasMinorGridlines=True
'Thefollowingtwolinesofcodesetthelineweightofthe'majorandminorgridlinesforthevalueaxis.axValueAxis.MajorGridlines.Line.Weight=chConstants.owcLineWeightMediumaxValueAxis.MinorGridlines.Line.Weight=chConstants.owcLineWeightHairline
EndSub
![Page 172: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/172.jpg)
ChInteriorObject
Multipleobjects ChInterior
Representstheinteriorformattingofanobject.
![Page 173: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/173.jpg)
UsingtheChInteriorobjectThefollowingpropertiesreturnaChInteriorobject:
TheChChartobject'sInteriorproperty
TheChChartDrawobject'sInteriorproperty
TheChartSpaceobject'sInteriorproperty
TheChDataLabelobject'sInteriorproperty
TheChDataLabelsobject'sInteriorproperty
TheChDropZoneobject'sButtonInteriorproperty
TheChDropZoneobject'sWatermarkInteriorproperty
TheChLegendobject'sInteriorproperty
TheChPlotAreaobject'sInteriorproperty
TheChPointobject'sInteriorproperty
TheChSegmentBoundaryobject'sInteriorproperty
TheChSeriesobject'sInteriorproperty
TheChSurfaceobject'sInteriorproperty
TheChTitleobject'sInteriorproperty
ThefollowingexamplesetstheinteriorfillofthefirsttwoseriesandtheplotareaofthefirstchartinChartSpace1.
SubFormatInteriorFills()
DimchConstantsDimserSeries1DimserSeries2
SetchConstants=ChartSpace1.Constants
![Page 174: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/174.jpg)
SetserSeries1=ChartSpace1.Charts(0).SeriesCollection(0)SetserSeries2=ChartSpace1.Charts(0).SeriesCollection(1)
'Settheinteriorfillofthefirstseriestoatwo-colorgradient.serSeries1.Interior.SetTwoColorGradientchConstants.chGradientDiagonalDown,_chConstants.chGradientVariantCenter,"Blue","Silver"
'Settheinteriorfillofthesecondseriestoasolidcolor.serSeries2.Interior.SetSolid"Purple"
'Settheinteriorfilloftheplotareatoapresettexture.ChartSpace1.Charts(0).PlotArea.Interior.SetTextured_chConstants.chTextureParchment,chConstants.chTile
EndSub
![Page 175: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/175.jpg)
ChLegendObject
Multipleobjects ChLegendMultipleobjects
Representsachartworkspaceorchartlegend.Achartorchartworkspacecanhaveonlyonelegend.TheChLegendobjectcontainsaChLegendEntriescollectionthatcontainsoneormoreChLegendEntryobjects.
![Page 176: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/176.jpg)
UsingtheChLegendobjectUsetheHasLegendpropertyortheHasChartSpaceLegendpropertytoenablethelegend.
ThefollowingpropertiesreturnaChLegendobject.
TheChartSpaceobject’sChartSpaceLegendproperty
TheChChartobject’sLegendproperty
TheChLegendEntriesobject’sParentproperty
TheChLegendEntryobject’sParentproperty
![Page 177: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/177.jpg)
ChLegendEntryObject
ChLegend ChLegendEntriesChLegendEntryMultipleobjects
Representsasinglelegendentry.TheChLegendEntryobjectisamemberoftheChLegendEntriescollection.
![Page 178: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/178.jpg)
UsingtheChLegendEntryobjectTheChLegendEntriescollection’sItempropertyreturnsaChLegendEntryobject.
UseLegendEntries(index),whereindexisthelegendentryindexnumber,toreturnasingleLegendEntryobject.Youcannotreturnlegendentriesbyname.
Theindexnumberrepresentsthepositionofthelegendentryinthelegend.LegendEntries(0)isatthetopofthelegend,andLegendEntries(LegendEntries.Count)isatthebottom.Thefollowingexamplechangesthefontforthetextofthelegendentryatthetopofthechartspacelegend(thisisusuallythelegendforseriesone)inChartspace1.
Chartspace1.ChartSpaceLegend.LegendEntries(0)_.Font.Bold=True
![Page 179: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/179.jpg)
ChLineObject
Multipleobjects ChLine
Representstheformattingofalineonachart.
![Page 180: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/180.jpg)
UsingtheChLineobjectYoucanusethefollowingpropertiestoreturnaChLineobject:
TheChAxisobject'sLineproperty
TheChChartDrawobject'sLineproperty
TheChErrorBarsobject'sLineproperty
TheChGridlinesobject'sLineproperty
TheChPointobject'sLineproperty
TheChSegmentBoundaryobject'sLineproperty
TheChSeriesobject'sLineproperty
TheChTrendlineobject'sLineproperty
![Page 181: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/181.jpg)
ChMarkerObject
ChSeries ChMarker
RepresentsadatamarkeronaLine,XY(Scatter),Radar,orPolarchart.
![Page 182: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/182.jpg)
UsingtheChMarkerobjectTheChSeriesobject’sMarkerpropertyreturnsaChMarkerobject.
UsetheSizeandStylepropertiestoformatChMarkerobjects.
ThefollowingexampleconvertsthefirstseriesinthefirstchartofChartspace1toalinechart,andthenformatsthemarkersontheline.
SubFormatMarkers()
DimserSeries1DimchConstants
SetchConstants=ChartSpace1.Constants
'Setavariabletothefirstseriesofthefirstchart'inChartspace1.SetserSeries1=ChartSpace1.Charts(0).SeriesCollection(0)
'Changethetypeofthefirstdataseriestoalinechart.serSeries1.Type=chConstants.chChartTypeLineMarkers
'Setthemarkerstyle.serSeries1.Marker.Style=chConstants.chMarkerStyleDiamond
'Setthesizeofthemarkers.serSeries1.Marker.Size=7
EndSub
![Page 183: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/183.jpg)
ChPlotAreaObject
Multipleobjects ChPlotAreaMultipleobjects
Representstheplotareaonachart(theareawherethechartdataisplotted).Pie,Doughnut,Radar,andPolarchartsdonothaveaplotarea;instead,thesechartsdrawdirectlyonthechartarea.
![Page 184: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/184.jpg)
UsingtheChPlotAreaobjectTheChChartobject’sPlotAreapropertyreturnsaChPlotAreaobject.
ThefollowingexamplefillstheplotareaofthefirstchartinChartspace1withapredefinedtexture.
SubFormatPlotArea()DimchConstants
SetchConstants=ChartSpace1.Constants
'Settheinteriorfilloftheplotareatoapresettexture.ChartSpace1.Charts(0).PlotArea.Interior.SetTextured_
chConstants.chTextureParchment,chConstants.chTile
EndSub
![Page 185: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/185.jpg)
ChPointObject
ChSeries ChPointsChPointMultipleobjects
Representsasingledatapointinaseriesonachart.TheChPointobjectisamemberoftheChPointscollection,whichcontainsallthepointsinagivenseries.
![Page 186: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/186.jpg)
UsingtheChPointobjectUsethisobjecttoformatsingledatapointsinaseries,orusetheGetValuemethodtoreturnapointvalue.
TheChPointsobject’sItempropertyreturnsaChPointobject.
![Page 187: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/187.jpg)
ChScalingObject
Multipleobjects ChScaling
Representsthescalingforadataseries,axis,orchart.
![Page 188: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/188.jpg)
UsingtheChScalingobjectThefollowingpropertiesreturnaChScalingobject:
TheChAxisobject'sScalingproperty
TheChChartobject'sScalingsproperty
TheChSeriesobject'sScalingsproperty
![Page 189: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/189.jpg)
ChScrollViewObject
ChChart ChScrollView
![Page 190: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/190.jpg)
UsingtheChScrollViewObjectYouusemethodsandpropertiesoftheChScrollViewobjecttoretrieveinformationandtocontrolthescrollviewofachart.
YouusethetheScrollViewpropertyoftheChChartobjecttoretrievetheChScrollViewobjectofthechart(oneperchart.)Thisobjectistheprimaryinterfacethatallowsapplicationstoretrieveinformationandcontrolthescrollview.TheChScrollViewobjecthasseveralpropertiesthatyoucanusetospecifyanddeterminethescrollviewofthechart.
YouusemethodsandpropertiesoftheChScrollViewobjecttoretrieveinformationaboutandcontroltheviewofachart.TheportionoftheChartcomponentthatdisplaysthechartitselfisthevisibleplotareaanditcandisplaytheentirechartoraportionofthechart.Whenonlyaportionofthechartisdisplayedinthevisibleplotarea,theeffectisasifyouhavezoomedinonthatportionofthechartandtheremainderofthechartiscontainedwithinavirtualplotareathatextendsbeyondtheboundaryofthevisibleplotarea.
TheVerticalPositionandHorizontalPositionpropertiesshiftthescrollviewverticallyandhorizontally.Theinitialvaluesofthesepropertiesaretreatedasthelocation(0,0),andarerelativetothevaluesoftheLeftandToppropertiesoftheactualplotarea(theChPlotAreaobject).TheincrementalshiftinthepositionofthescrollviewisrelativetotheratiooftheVerticalExtentandVerticalExtentMaxproperties,andtotheratiooftheHorizontalExtentandHorizontalExtentMaxproperties.
TheratiooftheVerticalExtentandVerticalExtentMaxpropertiesdescribesthepositionofthescrollviewarea’sverticaldimensionrelativetotheactualplotarea’sverticaldimension.TheratiooftheHorizontalExtentandHorizontalExtentMaxpropertiesvaluedescribesthepositionofthescrollviewarea’shorizontaldimensionrelativetotheactualplotarea’shorizontaldimension.
YoucanzoomthedisplayofthechartinoroutbysettingtheVerticalExtentMaxandHorizontalExtentMaxpropertiestovaluesgreaterorlessthantheVerticalExtentandHorizontalExtentproperties,respectively.Forexample,tozoomthechartby200%,setthe
![Page 191: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/191.jpg)
VerticalExtentMaxandHorizontalExtentMaxpropertiestotwicethevalueoftheVerticalExtentandHorizontalExtentproperties.
Whetherthechartiszoomedornot,youcanaccessthescrollview’sdimensionsbyusingtheTop,Left,Right,andBottompropertiesoftheChScrollViewobject.And,youcanaccesstheactualplotarea’sdimensionsbyusingtheTop,Left,Right,andBottompropertiesoftheChPlotAreaobject.
IfthevalueofeithertheHorizontalExtentortheHorizontalExtentMaxpropertyislessthanorequaltozero(0),thescrollviewisdisabledandachartcannotbescrolledhorizontally.Similarly,achartcannotbescrolledverticallyifthevalueofeithertheVerticalExtentMaxortheVerticalExtentpropertyislessthanorequaltozero.
YoucanalsochangethescrollpositionandscrollextentusingtheSetPositionandSetExtentmethodsoftheChartcomponent.UsingtheSetPositionandSetExtentmethodsisthesameassettingtheindividualHorizontalExtent,VerticalExtent,HorizontalPosition,andVerticalPositionproperties,butthesemethodsallowyoutosetmultiplepropertiesatthesametimetoreducethenumberoftimesthechartisrepainted.
![Page 192: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/192.jpg)
ChSegmentObject
ChFormatMap ChSegmentsChSegmentChSegmentBoundary
Representsasinglesegmentinaformatmap.Eachsegmentofaformatmapcanbeformattedindependentlyoftheothersegments.
![Page 193: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/193.jpg)
UsingtheChSegmentobjectThefollowingmethodsandpropertiesreturnaChSegmentobject.
TheChSegmentsobject'sAddmethod
TheChSegmentsobject'sItemproperty
UsetheAddmethodoftheChSegmentsobjecttocreateanewsegment.UsethepropertiesoftheChSegmentBoundaryobjectreturnedbytheBeginpropertytoformatthebeginningofasegment.UsethepropertiesoftheChSegmentBoundaryobjectreturnedbytheEndpropertytoformattheendofasegment.
![Page 194: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/194.jpg)
ExampleThefollowingexamplebindsChartspace1totheOrderDetailstableintheNorthwinddatabase.Then,twosegmentsarecreated.Thefirstsegmenthighlightsthelowest10%ofvaluesinthefirstseriesinthechart.Thesecondsegmenthighlightsthetop20%ofvaluesinthefirstseriesinthechart.
SubWindow_Onload()
Dimserseries1DimsegBottom10PctDimsegTop20PctDimchConstants
SetchConstants=ChartSpace1.Constants
'ThefollowingtwolinesofcodebindChartspace1totheOrderDetailstableinthe'NorthwindSQLServerdatabase.
ChartSpace1.ConnectionString="Provider=SQLOLEDB.1;persistSecurityInfo=TRUE;"&_"IntegratedSecurity=SSPI;InitialCatalog=Northwind;DataSource="&_"ServerName;"
ChartSpace1.DataMember="OrderDetails"
'ThefollowingtwolinesofcodebindChartspace1totheQuantityandProductIDfields'intheOrderdetailstable.ChartSpace1.SetDatachConstants.chDimCategories,chConstants.chDataBound,"ProductID"ChartSpace1.SetDatachConstants.chDimValues,chConstants.chDataBound,"Quantity"
'Createaformatmap.ChartSpace1.SetDatachConstants.chDimFormatValues,chConstants.chDataBound,"Quantity"
![Page 195: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/195.jpg)
'SetavariabletothefirstseriesinthefirstchartinChartspace1.Setserseries1=ChartSpace1.Charts(0).SeriesCollection(0)
'Addasegmenttotheformatmap.Thissegmentwill'representthebottom10%ofvaluesinthechart.SetsegBottom10Pct=serseries1.FormatMap.Segments.Add
'Measurethesegmentboundariesbaseduponapercentage.
segBottom10Pct.Begin.ValueType=chConstants.chBoundaryValuePercentsegBottom10Pct.End.ValueType=chConstants.chBoundaryValuePercent
'Setthebeginningvalueto0%,andtheendingvalueto10%segBottom10Pct.Begin.Value=0segBottom10Pct.End.Value=0.1
'Formattheinteriorofthematchingvalues.segBottom10Pct.Begin.Interior.Color="red"segBottom10Pct.End.Interior.Color="red"
'Addasegmenttotheformatmap.Thissegmentwill'representthetop20%ofvaluesinthechart.
SetsegTop20Pct=serseries1.FormatMap.Segments.Add
'Measurethesegmentboundariesbaseduponapercentage.segTop20Pct.Begin.ValueType=chConstants.chBoundaryValuePercentsegTop20Pct.End.ValueType=chConstants.chBoundaryValuePercent
'Setthebeginningvalueto80%,andtheendingvalueto100%.segTop20Pct.Begin.Value=0.8segTop20Pct.End.Value=1
![Page 196: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/196.jpg)
'Formattheinteriorofthematchingvalues.segTop20Pct.Begin.Interior.Color="green"segTop20Pct.End.Interior.Color="green"
EndSub
![Page 197: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/197.jpg)
ChSegmentBoundaryObject
ChSegment ChSegmentBoundaryMultipleobjects
RepresentstheboundariesofofaChSegmentobject.
![Page 198: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/198.jpg)
UsingtheChSegmentBoundaryobjectThefollowingpropertiesreturnaChSegmentBoundaryobject.
TheChSegmentobject'sBeginproperty
TheChSegmentobject'sEndproperty
UsetheValuepropertytosetthebeginningandendingvaluesofaChSegmentBoundaryobject.UsetheValueTypepropertytospecifywhetheravaluerepresentsapercentageoranabsolutevalue.
UsetheobjectsreturnedbythefollowingpropertiestoformataChSegmentBoundaryobject:Border,Interior,andLine.
![Page 199: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/199.jpg)
ChSegmentsObject
ChFormatMap ChSegmentsMultipleobjects
RepresentsthecollectionofsegmentsforaChFormatMapobject.
![Page 200: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/200.jpg)
UsingtheChSegmentsobjectTheSegmentspropertyoftheChFormatMapobjectcanbeusedtoreturnaChSegmentsobject.
UsetheAddmethodoftheChSegmentsobjecttoaddasegmenttoaformatmap.
UsetheItempropertyoftheChSegmentsobjecttoreturnasingleChSegmentobject.
![Page 201: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/201.jpg)
ChSeriesObject
Multipleobjects ChSeriesMultipleobjects
Representsaseriesonachart.TheChSeriesobjectisamemberoftheChSeriesCollectioncollection.
![Page 202: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/202.jpg)
UsingtheChSeriesobjectUsetheAddmethodoftheChSeriesCollectioncollectiontoaddaseriestoachart.
ThefollowingpropertiesandmethodsreturnaChSeriesobject:
TheChDataLabelsobject’sParentproperty
TheChDataLabelsCollectionobject’sParentproperty
TheChErrorBarsobject’sParentproperty
TheChErrorBarsCollectionobject’sParentproperty
TheChPointobject’sParentproperty
TheChPointsobject’sParentproperty
TheChSeriesCollectionobject’sAddmethod
TheChSeriesCollectionobject’sItemproperty
TheChTrendlineobject’sParentproperty
TheChTrendlinesobject’sParentproperty
![Page 203: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/203.jpg)
ChSurfaceObject
ChPlotArea ChSurfaceMultipleobjects
Representsthesurfaceofthewallsandfloorofachart.
![Page 204: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/204.jpg)
UsingtheChSurfaceobjectThefollowingpropertiescanbeusedtoreturnaChSurfaceobject:
TheChChartobject'sBackWallproperty
TheChChartobject'sSideWallproperty
TheChChartobject'sFloorproperty
YoucanusetheBorder,Interior,andThicknesspropertiestoformataChSurfaceobject.
![Page 205: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/205.jpg)
ChTitleObject
Multipleobjects ChTitleMultipleobjects
Representsthetitleofachartworkspace,axis,orchart.
![Page 206: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/206.jpg)
UsingtheChTitleobjectUsetheHasTitleorHasChartspaceTitlepropertytoenabletitles.
ThefollowingpropertiesreturnaChTitleobject:
TheChartSpaceobject’sChartSpaceTitleproperty
TheChAxisobject’sTitleproperty
TheChChartobject’sTitleproperty
ThefollowingexampleaddsatitletothefirstchartinChartpsace1andthenformatsthenewly-createdtitle.
SubAddChartTitle()
DimChart1TitleDimchConstants
SetchConstants=ChartSpace1.Constants
'Enablethetitleforthefirstchartinthe'chartspace.ChartSpace1.Charts(0).HasTitle=True
'Setavariabletothecharttitle.SetChart1Title=ChartSpace1.Charts(0).Title
'Setthecaoptionforthetitle.Chart1Title.Caption="2000SalesbyDepartment"
'Setthetitletodisplayatthebottomofthechart.Chart1Title.Position=chConstants.chTitlePositionBottom
'Formatthefontusedforthetitle.
![Page 207: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/207.jpg)
Chart1Title.Font.Bold=TrueChart1Title.Font.Name="Tahoma"Chart1Title.Font.Size=16
EndSub
![Page 208: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/208.jpg)
ChTrendlineObject
ChSeries ChTrendlinesChTrendlineMultipleobjects
Representsatrendlineonachart.Atrendlineshowsthetrend,ordirection,ofdatainaseries.TheChTrendlineobjectisamemberoftheChTrendlinescollection.
![Page 209: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/209.jpg)
UsingtheChTrendlineobjectUsetheAddmethodoftheChTrendlinesobjecttoaddatrendlinetoaseries.
ThefollowingmethodandpropertyreturnaChTrendlineobject.
TheChTrendlinescollection’sAddmethod
TheChTrendlinescollection’sItemproperty
ThefollowingexampleaddsatrendlinetothefirstseriesinthefirstchartinChartspace1andthenformatsthetrendline.
SubAddPolyTrendline()
DimserSeries1DimchConstantsDimtlSeries1Trend
SetchConstants=ChartSpace1.Constants
'Setavariabletothefirstseriesofthefirstchart'inChartspace1.SetserSeries1=ChartSpace1.Charts(0).SeriesCollection(0)
'Addatrendlinetothefirstseriesandreturn'aTrendlineobject.SettlSeries1Trend=serSeries1.Trendlines.Add
'Displaytheequationusedtocalculatethetrendline.tlSeries1Trend.IsDisplayingEquation=True
'Setthetrendlinetobeapolynomialtrendline.tlSeries1Trend.Type=chConstants.chTrendlineTypePolynomial
![Page 210: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/210.jpg)
EndSub
![Page 211: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/211.jpg)
ChUserDefinedSelectionObject
ChUserDefinedSelection
RepresentsanobjectdrawnonthechartbetweencallstotheBeginObjectandEndObjectmethods.
![Page 212: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/212.jpg)
UsingtheChUserDefinedSelectionobjectWhenacustomdrawingobjectisselected,theChartSpaceobject'sSelectionpropertyreturnsaChUserDefinedSelectionobject.
![Page 213: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/213.jpg)
CoordinateObject
Coordinate
StorestheXandY-coordinatesofadatapointforlaterretrieval.
![Page 214: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/214.jpg)
UsingtheCoordinateobjectUsetheValueToPointmethodoftheChAxisorChSeriesobjecttoreturnaCoordinateobject.
UsethexandypropertiesoftheCoordinateobjecttoreturntheXandY-coordinatesofthedatapointcurrentlystoredintheCoordinateobject.
ThefollowingexamplechangesthetitleofthefirstchartinChartspace1tothepixelcoordinatesofadatapointinthefirstseriesofthechart.
SubGetPixelCoordinates()
DimchChart1DimlXPosDimlYPosDimcoPointCoordinates
'SetavariabletothefirstchartinChartspace1.SetchChart1=ChartSpace1.Charts(0)
'Enablethetitleforthechart.chChart1.HasTitle=True
'SetaCoordinateobjecttothecoordinatesofadatapoint.SetcoPointCoordinates=chChart1.SeriesCollection(0).ValueToPoint("Pears",10)
'SetavariabletotheX-coordinate.lXPos=coPointCoordinates.x
'SetavariabletotheY-coordinate.lYPos=coPointCoordinates.y
'Setthechart'stitlestothepixelcoordinatesofthespecified
![Page 215: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/215.jpg)
'datapoint.chChart1.Title.Caption="X("&lXPos&")Y("&lYPos&")"
EndSub
![Page 216: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/216.jpg)
CriteriaObject
Filter CriteriaFilter
ContainstheentirearrayofAutoFiltercriteria.EachcriterionisaStringvalue.TheAutoFilterobjectcontainsaFilterscollection,theFilterscollectioncontainsaFilterobjectforeachcolumninthefilteredrange,andeachFilterobjectcontainsaCriteriaobject.
![Page 217: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/217.jpg)
UsingtheCriteriaObjectTheFilterobject’sCriteriapropertyreturnstheCriteriaobjectforthespecifiedfilter.
![Page 218: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/218.jpg)
DataPageObject
Multipleobjects DataPageMultipleobjects
Representsthecombinationofsectionsthatareshownonadataaccesspagewhentheexpandbuttonisclicked.Thesesectionsincludeacaptionsection,agroupheaderandgroupfootersectionforeachrecord,andanavigationsectioncorrespondingtothesetofvisiblerecordsfromarecordsetwithinasingleparentrecord.
TheDataPageobjectisamemberoftheDataPagescollection.
![Page 219: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/219.jpg)
UsingtheDataPageObjectThefollowingpropertiesreturnaDataPageobject:
TheDataPagesobject'sItemproperty
TheSectionobject'sDataPageproperty
TheDSCEventInfoobject'sDataPageproperty
![Page 220: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/220.jpg)
DataSourceControlObject
DataSourceControl Multipleobjects
Representsadatasourcecontrol.Thedatasourcecontrolisthetop-levelcontainerinthedatamodel.
![Page 221: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/221.jpg)
UsingtheDataSourceControlObjectYoucanuseeithertheCreateObjectmethodortheNewkeywordtocreateaDataSourceControlobject.
TheobjectIDforadatasourcecontrolonanHTMLpagereturnsaDataSourceControlobject.TheprogrammaticidentifierfortheDataSourceControlobjectisCLSID:CLSID:0002E55B-0000-0000-C000-000000000046.Thefollowingexamplecreatesadatasourcecontrolnamed"MSODSC"onanHTMLpage.
<objectid=MSODSCclassid=CLSID:0002E55B-0000-0000-C000-000000000046></object>
![Page 222: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/222.jpg)
DSCEventInfoObject
DSCEventInfo Multipleobjects
Containsinformationaboutthespecifieddatasourcecontrolevent.
![Page 223: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/223.jpg)
UsingtheDSCEventInfoObjectThefollowingdatasourcecontroleventsuseaDSCEventInfoobjectastheironlyparameter:
TheAfterDeleteevent
TheAfterInsertevent
TheAfterUpdateevent
TheBeforeCollapseevent
TheBeforeDeleteevent
TheBeforeExpandevent
TheBeforeFirstPageevent
TheBeforeInitialBindevent
TheBeforeInsertevent
TheBeforeLastPageevent
TheBeforeNextPageevent
TheBeforeOverwriteevent
TheBeforePreviousPageevent
TheBeforeUpdateevent
TheCurrentevent
TheDataErrorevent
TheDataPageCompleteevent
TheDirtyevent
TheFocusevent
TheRecordExitevent
![Page 224: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/224.jpg)
TheRecordsetSaveProgressevent
TheUndoevent
YoucanusethepropertiesoftheDSCEventInfoobjecttoreturninformationaboutthedataaccesspagewhenaneventistrapped.TheSectionpropertycanbeusedtodeterminethesectionofthedataaccesspagewheretheeventoccurred.YoucanusetheReturnValuepropertytocancelthecompletionofsomeevents.
TheeventslistedabovevaryintheirsupportoftheDSCEventInfoproperties.SomeoftheeventssupportasubsetoftheDSCEventInfoproperties,andsomeeventsdon'tsupportanyoftheDSCEventInfoproperties.Usinganunsupportedpropertywillresultinarun-timeerror.
ThefollowingexamplecancelsthedeletionofarecordiftheDiscontinuedfieldissettheNo.TheSectionpropertyoftheDSCEventInfoobjectisusedtodrilldowntothevalueoftheDiscontinuedfield.IfthefieldcontainsthevalueNo,thentheReturnValueoftheDSCEventInfoobjectissettoFalse,cancelingthedeletionoftherecord.
SubMSODSC_BeforeDelete(DSCEventInfo)
DimtxtDiscontinued
'Setavariabletothetextboxthatcontainsthevalue'oftheDiscontinuedfieldfortherecordthatistobedeleted.SettxtDiscontinued=DSCEventInfo.Section.HTMLContainer_.Children("Discontinued")
'Checkthevalueofthecontrol.IftxtDiscontinued.Value="No"Then
'Displayamessagetotheuser.Msgbox"Donotdeleteproductsthathavenot"&_"beendiscontinued."
![Page 225: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/225.jpg)
Cancelthedeletionoftherecord.DSCEventInfo.ReturnValue=FalseEndIf
EndSub
![Page 226: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/226.jpg)
ElementExtensionObject
Multipleobjects ElementExtensionsElementExtension
Addsdata-relatedpropertiestoHTMLelementssuchastextboxesanddrop-downlistboxes.ElementextensionstierecordsetandgroupingdefinitionobjectssuchaspagefieldstoanelementontheHTMLpagethatcanbeboundtotheirresultingdata.
TheElementExtensionobjectisamemberoftheElementExtensionscollection.
![Page 227: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/227.jpg)
UsingtheElementExtensionObjectThefollowingmethodandpropertyreturnanElementExtensionobject:
TheElementExtensionscollection'sAddmethod
TheElementExtensionscollection'sItemproperty
![Page 228: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/228.jpg)
FilterObject
Multipleobjects FilterMultipleobjects
RepresentsasinglefilterusedwiththeAutoFilter.TheFilterobjectisamemberoftheFilterscollection.TheAutoFilterobjectcontainsaFilterscollection,theFilterscollectioncontainsaFilterobjectforeachcolumninthefilteredrange,andeachFilterobjectcontainsaCriteriaobject.
![Page 229: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/229.jpg)
UsingtheFilterObjectTheFiltersobject'sItempropertyreturnsaFilterobject.
![Page 230: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/230.jpg)
FontObject
Multipleobjects Font
Containsthefontattributes(fontname,fontsize,color,andsoon)foranobject.
![Page 231: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/231.jpg)
UsingtheFontobjectUsetheFontpropertytoreturnaFontobject.
ThefollowingexampleformatscellsA1:C5asbold.
Spreadsheet1.ActiveSheet.Range("A1:A5").Font.Bold=True
![Page 232: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/232.jpg)
GroupingDefObject
Multipleobjects GroupingDefPageFields
Representsagroupingdefinition.Agroupingdefinitionisaspecialtypeofrecordsetdefinition.AswithRecordsetDefobjects,youcanuseagroupingdefinition'snameintheExecutemethodandintheRecordSourcepropertyofagrouplevelorelementextension.
AgroupingdefinitiondefinesanADOgroupingrecordsetthatappearsasaparentofthecontainingrecordsetinthehierarchyorrecordsetsproducedbyapage.Atruntime,allthedataforthecontainingrecordsetdefinitionisfetchedbeforethegroupingrecordsetiscreated.
![Page 233: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/233.jpg)
UsingtheGroupingDefObjectThefollowingmethodsandpropertyreturnaGroupingDefobject:
TheGroupingDefscollection'sAddmethod
TheGroupingDefscollection'sAddTotalmethod
TheGroupingDefsorAllGroupingDefscollections'Itemproperty
![Page 234: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/234.jpg)
GroupLevelObject
Multipleobjects GroupLevel
Representsthesetofallrecordsatagivenlevelofthedataaccesspagehierarchy.TheGroupLevelobjectisamemberoftheGroupLevelscollection.
![Page 235: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/235.jpg)
UsingtheGroupLevelObjectThefollowingmethodandpropertyreturnaGroupLevelobject:
TheGroupLevelscollection’sAddmethod
TheGroupLevelscollection’sItemproperty
TheDataPageobject'sGroupLevelproperty
![Page 236: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/236.jpg)
HeadingObject
Window HeadingsHeadingWindow
Representsasingleroworcolumnheaderinthespecifiedwindow'sHeadingscollection.
![Page 237: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/237.jpg)
UsingtheHeadingobjectUsetheHeadingscollection'sItempropertytoreturnanindividualHeadingobject.ThiscanbeexpressedasHeadings(Index)orHeadings.Item(Index),whereIndexistheindexnumberoftheindividualHeadingobject.
UsetheCaptionpropertytocustomizetherowandcolumnheadingsinawindow.ThefollowingexampleillustrateshowtousetheCaptionpropertytochangetherowandcolumnheadinginawindow:
SubChange_Headings()
DimhdrColHeadingsDimhdrRowHeadings
'Setavariabletothecolumnheadingsintheactivewindow.SethdrColHeadings=Spreadsheet1.ActiveWindow.ColumnHeadings
'Setavariabletotherowheadingsintheactivewindow.SethdrRowHeadings=Spreadsheet1.ActiveWindow.RowHeadings
'SettheheadingsofcolumnsAthroughD.hdrColHeadings(1).Caption="Qtr1"hdrColHeadings(2).Caption="Qtr2"hdrColHeadings(3).Caption="Qtr3"hdrColHeadings(4).Caption="Qtr4"
'Settheheadingsofrows1though5.hdrRowHeadings(1).Caption="Sedan"hdrRowHeadings(2).Caption="Convertible"hdrRowHeadings(3).Caption="Truck"hdrRowHeadings(4).Caption="Sport-Utility"
![Page 238: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/238.jpg)
hdrRowHeadings(5).Caption="Minivan"
EndSub
TheCaptionpropertyoftheHeadingobjectislimitedto256characters,andthetextcannotbewrappedtoasecondline.
UsetheResetHeadingsmethodtosettherowandcolumnheadingsbacktotheirdefaultvalues.
![Page 239: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/239.jpg)
HyperlinkObject
Range HyperlinkRange
Representsahyperlink.
![Page 240: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/240.jpg)
UsingtheHyperlinkObjectTheRangeobject’sHyperlinkpropertyreturnsaHyperlinkobject.
![Page 241: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/241.jpg)
InteriorObject
Multipleobjects Interior
Representstheinteriorofanobject.
![Page 242: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/242.jpg)
UsingtheInteriorObjectThefollowingpropertiesreturnanInteriorobject:
TheRangeobject’sInteriorproperty
TheTitleBarobject’sInteriorproperty
![Page 243: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/243.jpg)
ListObjectObject
Multipleobjects ListObjectMultipleobjects
![Page 244: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/244.jpg)
UsingtheListObjectObjectAListObjectobjectrepresentsanXMLlistonaworksheet.TheListObjectobjectisamemberoftheListObjectscollection.IndividualListObjectobjectsintheListObjectscollectionareindexedbeginningwith1forthefirstobject,2forthesecondobject,andsoon.YouusetheItempropertytoreturnasingleListObjectobjectfromtheListObjectscollection.TheargumentfortheItempropertyisthenameortheindexnumberintheListObjectscollectionoftheListObjectobject.ThenameisthevalueoftheIDattributeofanEntryelement(MapInfo/Map/Entry)inanXMLspreadsheetfile.TheXMLfragmentwherethesedetailsappearintheXMLSpreadsheetfilelookssomethinglikethefollowing:
<x2:MapInfoxmlns:x2="http://schemas.microsoft.com/office/excel/2003/xml"><x2:Mapx2:ID="Cust_MapId"><x2:Entryx2:ID="example_id"x2:Type="table">...</x2:Entry></x2:Map></x2:MapInfo>
YoucanalsogetthenamebyusingtheNamepropertyoftheListObjectobject.UsingMicrosoftExcel,youcancreateanXMLSpreadsheetfilebycreatingadataboundspreadsheetandthensavingtheworkbookasanXMLSpreadsheet.
ThisexamplesetsthelineweightoftheborderfortherangeofthespecifiedlistintheSpreadsheetcomponent.
SubSetListBorder()DimssConstantsDimrngList
SetssConstants=Spreadsheet1.Constants
![Page 245: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/245.jpg)
'Setavariabletotherangethatcontainsthelist.SetrngList=Spreadsheet1.ActiveSheet.ListObjects(1).Range'Settherangeborderweight.rngList.Borders.Weight=ssConstants.owcLineWeightMediumEndSub
![Page 246: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/246.jpg)
ListRowObject
ListObject ListRowsListRowMultipleobjects
![Page 247: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/247.jpg)
UsingtheListRowObjectAListRowobjectrepresentsarowinaListObjectobjectinaSpreadsheetcomponent.TheListRowobjectisamemberoftheListRowscollection.TheListRowscollectioncontainsalltherowsinaListObjectobject.TheListRowobjecthasnodefaultproperty.
IndividualListRowobjectsintheListRowscollectionareindexedbeginningwith1forthefirstobject,2forthesecondobject,andsoforth.YouusetheItempropertytoreturnasingleListRowobjectfromtheListRowscollection.TheargumentfortheItempropertyistheindexnumberintheListRowscollectionoftheListRowobject.
YouusetheDeletemethodtodeletethecellsofarowinalist.Deletingtherowwillcauseashiftupfortheremainingcellsbelowthedeletedrow.Theread/writeActivepropertyoftheListRowobjectallowsyoutofindoutifarowisselectedortoselectit.YouusetheRangepropertytoreturnaRangeobjectthatrepresentstherangetowhichthespecifiedlistrowapplies.
YoufindoutthecurrentordinalpositionoftheListRowobjectintheListRowscollectionusingtheIndexproperty.TheApplicationandParentpropertiesreturntheSpreadsheetcomponentandtheparentobject(whichistheListObjectobject)forthespecifiedListRowsobject.
![Page 248: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/248.jpg)
NameObject
Multipleobjects NamesNameRange
Representsadefinednameforarangeofcells,aformula,oraconstantvalue.TheNameobjectisamemberoftheNamescollection.
![Page 249: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/249.jpg)
UsingtheNameobjectUseNames(index),whereindexisthename,indexnumberordefinedname,toreturnasingleNameobject.
Theindexnumberindicatesthepositionofthenamewithinthecollection.Thefollowingexampledisplaysthecellreferenceforthefirstnameintheapplicationcollection.
MsgBoxNames(1).RefersTo
Thefollowingexampledeletesthename"mySortRange"fromtheactiveworkbook.
ActiveWorkbook.Names("mySortRange").Delete
UsetheNamepropertytoreturnorsetthetextofthenameitself.ThefollowingexamplechangesthenameofthefirstNameobjectintheactiveworkbook.
Names(1).Name="stock_values"
UsetheAddmethodtocreateanameandaddittothecollection.ThefollowingexamplecreatesanewnamethatreferstocellsA1:C20ontheworksheetnamed"Sheet1."
Spreadsheet1.Names.Add"CurrentMonth","=Sheet1!$A$1:$C$20"
TheRefersToargumentmustbespecifiedinA1-stylenotation,includingdollarsigns($)whereappropriate.Forexample,ifcellA10isselectedonSheet1andyoudefineanamebyusingtheRefersToargument"=Sheet1!A1:B1",thenewnameactuallyreferstocellsA10:B10(becauseyouspecifiedarelativereference).Tospecifyanabsolutereference,use"=Sheet1!$A$1:$B$1".
![Page 250: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/250.jpg)
OCCommandObject
Multipleobjects OCCommandsOCCommand
RepresentsasinglecommandinthespecifiedMicrosoftOfficeWebComponent.
![Page 251: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/251.jpg)
UsingtheOCCommandobjectUsetheItempropertyoftheOCCommandscollectiontoreturnasingleOCCommandobject.
TheOCCommandId,ChartCommandIdEnum,PivotCommandId,andSpreadsheetCommandIdconstantscontainlistsofthesupportedcommandsforeachMicrosoftOfficeWebComponent.
UsetheExecutemethodoftheOCCommandobjecttoexecuteaparticularcommand.ThefollowingexampleusestheExecutemethodtoselecttheupper-leftcellintheactivesheetofSpreadsheet1.
SubSelectUpperLeft()
DimssConstants
SetssConstants=Spreadsheet1.Constants
'Selecttheupper-leftcellintheactiveworksheet.Spreadsheet1.Commands(ssConstants.ssCommandMoveToOrigin).Execute
EndSub
UsetheCommandBeforeExecuteeventtoimposecertainrestrictionsbeforeacommandisexecuted,ortocancelacommand.ThefollowingexamplerefreshesPivotTable1whentheExportcommandisinvokedsothatthelatestdataisexportedtoMicrosoftExcel.
SubPivotTable1_CommandBeforeExecute(Command,Cancel)
DimptConstants
SetptConstants=PivotTable1.Constants
![Page 252: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/252.jpg)
'ChecktoseeiftheExportcommand'hasbeeninvoked.IfCommand=ptConstants.plCommandExportThen
'RefreshthePivotTablelist.PivotTable1.Refresh
EndIf
EndSub
Thefollowingexamplepreventstheuserfromcutting,copying,orexportingthecontentsofSpreadsheet1toMicrosoftExcel.
SubSpreadsheet1_CommandBeforeExecute(Command,Cancel)
DimssConstants
SetssConstants=Spreadsheet1.Constants
SelectCaseCommand
'ChecktoseeiftheExportcommandhas'beeninvoked.CasessConstants.ssCommandExport
'Cancelthecommand.Cancel.Value=True
'Displayamessagetotheuser.MsgBox"Exportofthedataisprohibited."
'ChecktoseeiftheCutorCopycommands
![Page 253: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/253.jpg)
'havebeeninvoked.CasessConstants.ssCommandCopy,ssConstants.ssCommandCut
'Cancelthecommand.Cancel.Value=True
'Displayamessagetotheuser.MsgBox"CuttingorCopyingthedataisprohibited."EndSelect
EndSub
UsetheCommandExecuteeventwhenyouwanttoexecuteasetofcommandswhenaparticularcommandisexecuted.ThefollowingexamplewritesthecurrentdateandtimetoanHTMLtextboxcontroleverytimethatPivotTable1isrefreshed.
SubPivotTable1_CommandExecute(Command)
DimptConstants
SetptConstants=PivotTable1.Constants
'ChecktoseeifthePivotTablelisthasbeenrefreshed.IfCommand=ptConstants.plCommandRefreshThen
'Writethecurrentdataandtimetothetextbox.TextBox.Value="PivotTablelastrefeshedon"&_Date&"at"&Time
EndIf
![Page 254: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/254.jpg)
EndSub
![Page 255: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/255.jpg)
HiddenLanguageElementYouhaverequestedHelpforalanguageelementthatishidden,andthereforeunavailableforprogrammaticaccess.
![Page 256: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/256.jpg)
OWCLanguageSettingsObject
Multipleobjects OWCLanguageSettings
ReturnsinformationaboutthelanguagesettingsfortheMicrosoftOfficeWebComponents.
![Page 257: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/257.jpg)
UsingtheOWCLanguageSettingsobjectUseApplication.LanguageSettings.LanguageID(MsoAppLanguageID),whereMsoAppLanguageIDisoneofthefollowingconstantsusedtoreturnlocaleidentifier(LCID)informationtothespecifiedapplication:msoLanguageIDHelp,msoLanguageIDInstall,msoLanguageIDUI,ormsoLanguageIDUIPrevious.Thefollowingexamplereturnstheinstalllanguage,userinterfacelanguage,andHelplanguageLCIDsforaspreadsheetcontrolnamedSpreadsheet1inamessagebox.
MsgBox"ThefollowinglocaleIDsareregistered"&_"forthisapplication:InstallLanguage-"&_Spreadsheet1.LanguageSettings.LanguageID(msoLanguageIDInstall)&_"UserInterfaceLanguage-"&_Spreadsheet1.LanguageSettings.LanguageID(msoLanguageIDUI)&_"HelpLanguage-"&_Spreadsheet1.LanguageSettings.LanguageID(msoLanguageIDHelp)
ThefollowingexampletestswhethertheU.S.Englishlanguageisregisteredasapreferrededitinglanguage.
IfSpreadsheet1.LanguageSettings._LanguagePreferredForEditing(msoLanguageIDEnglishUS)ThenMsgBox"U.S.Englishisoneofthechoseneditinglanguages."EndIf
![Page 258: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/258.jpg)
PageFieldObject
Multipleobjects PageFieldMultipleobjects
Representsafieldinarecordsetorgroupingdefinition.Thepagefieldnameisusedbyacontrolonadataaccesspagetobindtodatafromarecordset.
PageFieldobjectscomeinthreetypes:
Output.Thistypecomesdirectlyfromaschemafieldinaschemarowsource.Forschemarowsourcesofthetabletypeorviewtype,thismeansthefieldislistedintheSELECTlistoftheSQLstatementgeneratedbythedatamodel.Forschemarowsourcesofthetexttypeorstoredproceduretype,allschemafieldsappearasoutputandthepagefieldnamemustbethesameastheschemafieldname.
Calculated.Thisisalocallycalculatedcolumnaddedtoarecordset.VisualBasicforApplicationsexpressionsyntaxissupported.ExpressionscanreferencepagefieldsoftypedscOutputordscGroupingwithinthesamerecordsetdefinitionorgroupingdefinition.ExpressionscanalsoreferenceHTMLelementsbyusingthedocumentobjectmodel(forexample,=Quantity*UnitPrice*Document.All("Text0").Value).Calculatedfieldsarerecalculatedwheneveranupdatedrecordissaved,wheneverthepageisrefreshed,orwhenevertherecordset'sResyncmethodiscalled.
Grouping.ThisisagroupingfieldoraggregatefieldattachedtoaGroupingDeforRecordsetDefobject.
ThePageFieldobjectcanbeamemberoftheAllPageFields,GroupingFields,OutputFields,orPageFieldscollection.
![Page 259: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/259.jpg)
UsingthePageFieldObjectThefollowingpropertiesandmethodreturnaPageFieldobject:
TheAllPageFieldscollection'sItemproperty
ThePageFieldscollection'sAddmethod
ThePageFieldscollection'sItemproperty
ThePageRelatedFieldobject'sManySideproperty
ThePageRelatedFieldobject'sOneSideproperty
![Page 260: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/260.jpg)
PageRelatedFieldObject
PageRelationship PageRelatedFieldsPageRelatedFieldPageField
Representsapageinstanceofthecolumnpairingsthatmakeupapagerelationship.ThenamesofthesefieldsareusedingeneratingjoinclausesinSQLandinrelatingaparentrecordsetdefinitiontoachildrecordsetdefinition.
ThePageRelatedFieldobjectisamemberofthePageRelatedFieldscollection.
![Page 261: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/261.jpg)
UsingthePageRelatedFieldObjectThePageRelatedFieldscollection'sItempropertyreturnsaPageRelatedFieldobject.
![Page 262: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/262.jpg)
PageRelationshipObject
Multipleobjects PageRelationshipMultipleobjects
APageRelationshipobjecttiestwopagerowsourcestogether,eitherwithinarecordsetdefinition(aLookupRelationshipscollection)orbetweenrecordsetdefinitions(aSublistRelationshipscollection).ApagerelationshipiscreatedfrominformationinaSchemaRelationshipobject.
ThePageRelationshipobjectisamemberoftheLookupRelationshipsorSublistRelationshipscollection.
![Page 263: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/263.jpg)
UsingthePageRelationshipObjectThefollowingmethodsandpropertiesreturnaPageRelationshipobject:
TheLookupRelationshipscollection'sAddmethod
TheLookupRelationshipscollection'sItemproperty
TheSublistRelationshipscollection'sAddmethod
TheSublistRelationshipscollection'sItemproperty
![Page 264: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/264.jpg)
PageRowsourceObject
Multipleobjects PageRowsourceMultipleobjects
APageRowsourceobjectreferstoaninstanceofaSchemaRowsourceobjectthatiscurrentlyinuseonadataaccesspage.Atable,view,orstoredproceduremustbeinthedatamodelasaschemarowsourcebeforeitcanbeaddedasapagerowsource;thepagerowsourceisthenusedasadatasourceforthepage.
ThePageRowsourceobjectisamemberofthePageRowsourcescollection.
![Page 265: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/265.jpg)
UsingthePageRowsourceObjectThefollowingpropertiesreturnaPageRowsourceobject:
ThePageFieldobject'sPageRowsourceproperty
ThePageRelationshipobject'sManySideproperty
ThePageRelationshipobject'sOneSideproperty
ThePageRowsourcescollection'sItemproperty
TheRecordsetDefobject'sPrimaryPageRowsourceproperty
![Page 266: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/266.jpg)
PaneObject
Multipleobjects PaneMultipleobjects
Representsapaneinawindow.ThePaneobjectisamemberofboththePanescollectionandtheWindowobject.
![Page 267: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/267.jpg)
UsingthePaneObjectThefollowingpropertiesreturnaPaneobject:
ThePanescollection’sItemproperty
TheWindowobject’sActivePaneproperty
![Page 268: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/268.jpg)
ParameterValueObject
RecordsetDef ParameterValuesParameterValue
Representsaninputparametervalueexpression.Thisexpressionisevaluatedatexecutetimetoprovidearun-timeparametervaluetoarowsourceoftypedscProcedureordscCommandText.
![Page 269: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/269.jpg)
UsingtheParameterValueObjectThefollowingmethodandpropertyreturnaParameterValueobject:
TheParameterValuescollection'sAddmethod
TheParameterValuescollection'sItemproperty
![Page 270: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/270.jpg)
PivotAggregateObject
PivotCell PivotAggregatesPivotAggregateMultipleobjects
RepresentsthedataassociatedwithatotalinaPivotTablelist.Atotaldefineswhattheuserwantstosee,butthedatathatresultsfromthetotaliscalledtheaggregateoraggregatevalue.ThePivotAggregateobjectisamemberofthePivotAggregatescollection.
![Page 271: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/271.jpg)
UsingthePivotAggregateObjectThePivotAggregatescollection’sItempropertyreturnsaPivotAggregateobject.
![Page 272: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/272.jpg)
PivotAxisObject
Multipleobjects PivotAxisMultipleobjects
UsedasthebaseclassforthePivotResultAxis,PivotResultColumnAxis,PivotResultDataAxis,PivotResultFilterAxis,PivotResultGroupAxis,PivotResultPageAxis,andPivotResultRowAxisobjects.UsetheSourceAxispropertyofoneoftheseobjectstoreturnaPivotAxisobject.
![Page 273: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/273.jpg)
PivotAxisMemberObject
Multipleobjects PivotAxisMemberMultipleobjects
Representsthevaluesdisplayedforagroupedfield.ThePivotAxisMemberobjectisamemberofthePivotAxisMemberscollection.
![Page 274: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/274.jpg)
UsingthePivotAxisMemberobjectThefollowingpropertiesreturnaPivotAxisMemberobject:
TheFindAxisMemberpropertyofthePivotAxisMember,PivotColumnMember,PivotPageMember,andPivotRowMemberobjects
TheParentAxisMemberpropertyofthePivotAxisMember,PivotColumnMember,PivotPageMember,andPivotRowMemberobjects
TheTotalMemberpropertyofthePivotAxisMember,PivotColumnMember,PivotPageMember,andPivotRowMemberobjects
TheMemberpropertyofthePivotResultColumnAxis,PivotResultGroupAxis,PivotResultPageAxis,andPivotResultRowAxisobjects
TheItempropertyofthePivotAxisMemberscollection.
ThePivotAxisMemberhasmanypropertiesincommonwiththePivotMemberobject.HoweverthePivotAxisMemberobjectcontainssomepropertiesthatthePivotMemberobjectdoesnothave.YoucanusetheGroupFieldandCustomGroupTypepropertiestoaccessthegroupingsettingsofthemember.YoucanusetheHyperlinkpropertytoaccessthehyperlinksettingsofthemember.TheMemberPropertiespropertycanbeusedtoaccessanymemberpropertiesofthemember.TheHeight,Left,andWidthpropertiescanbeusedtosetthesizeandpositionofthemember.
![Page 275: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/275.jpg)
PivotCellObject
Multipleobjects PivotCellMultipleobjects
Representsacell(agroupingofdata)inaPivotTablelist.Acelldisplaysaggregates,andiftheunderlyingdetailrecordsareavailable,youcanhavethecelldisplayadetailgrid.Groupedfieldsontherowandcolumnaxisdeterminetheamountofdatathatagivencellrepresents.Evenasimplelistwithnogroupedfieldsisreallyasinglecelldisplayingadetailgrid.
![Page 276: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/276.jpg)
UsingthePivotCellObjectThefollowingpropertiesreturnaPivotCellobject:
ThePivotAggregate,PivotDetailCell,andPivotDetailRangeobjects'Cellproperty
ThePivotDataobject’sCells,CellsEx,andCurrentCellproperties
ThePivotRangeobject’sBottomRight,Cells,andTopLeftproperties
![Page 277: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/277.jpg)
PivotColumnMemberObject
Multipleobjects PivotColumnMemberMultipleobjects
RepresentsthevaluesdisplayedforagroupedfieldinthecolumnareaofaPivotTablelist.ThePivotColumnMemberobjectisamemberofthePivotColumnMemberscollection.
![Page 278: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/278.jpg)
UsingthePivotColumnMemberobjectThefollowingpropertiesreturnaPivotColumnMemberobject:
ThePivotCellobject'sColumnMemberproperty
ThePivotResultColumnAxisobject'sColumnMemberproperty
ThePivotColumnMemberobject'sFindColumnMemberproperty
ThePivotColumnMemberobject'sParentColumnMemberproperty
ThePivotColumnMemberobject'sTotalColumnMemberproperty
ThePivotColumnMemberscollection'sItemproperty
ThePivotDataobject'sLeftproperty
ThePivotColumnMemberobjecthasmanypropertiesincommonwiththePivotAxisMemberobject.UsetheDetailLeft,DetailLeftOffset,DetailsExpandedpropertiesorMoveDetailLeftmethodtocustomizethewaydetailrecordsaredisplayed.
![Page 279: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/279.jpg)
PivotDataObject
Multipleobjects PivotDataMultipleobjects
RepresentsthedatainaPivotTablelist.
![Page 280: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/280.jpg)
UsingthePivotDataObjectThefollowingpropertiesreturnaPivotDataobject:
TheDatapropertyofthefollowingobjects:PivotCell,PivotResultAxis,PivotResultColumnAxis,PivotResultDataAxis,PivotResultFilterAxis,PivotResultGroupAxis,PivotResultPageAxis,andPivotResultRowAxis.
ThePivotTableobject’sActiveDataproperty.
![Page 281: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/281.jpg)
PivotDataAxisObject
Multipleobjects PivotDataAxisMultipleobjects
RepresentsthedataaxisforaPivotTablelist.Thedataaxiscontainsfieldsetsandtotals.
![Page 282: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/282.jpg)
UsingthePivotDataAxisObjectThefollowingpropertiesreturnaPivotDataAxisobject:
ThePivotViewobject’sDataAxisproperty
ThePivotResultDataAxisobject'sSourceDataAxisproperty
![Page 283: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/283.jpg)
PivotDetailCellObject
Multipleobjects PivotDetailCellMultipleobjects
RepresentsacellinthedetailgridforaPivotTablelist.
![Page 284: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/284.jpg)
UsingthePivotDetailCellObjectThefollowingpropertiesreturnaPivotDetailCellobject:
ThePivotCellobject’sDetailCellsproperty
ThePivotDetailRangeobject’sBottomRightproperty
ThePivotDetailRangeobject’sTopLeftproperty
![Page 285: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/285.jpg)
PivotDetailRangeObject
PivotCell PivotDetailRangeMultipleobjects
RepresentstherangeofcellsinthedetailgridforaPivotTablelist.
![Page 286: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/286.jpg)
UsingthePivotDetailRangeObjectThePivotCellobject’sDetailRangepropertyreturnsaPivotDetailRangeobject.
![Page 287: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/287.jpg)
PivotFieldObject
Multipleobjects PivotFieldMultipleobjects
RepresentsasinglefieldinaPivotTablelist.
![Page 288: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/288.jpg)
UsingthePivotFieldObjectThefollowingpropertiesandmethodsreturnaPivotFieldobject:
TheFieldpropertyofthefollowingobjects:PivotAxisMember,PivotColumnMember,PivotDetailCell,PivotMember,PivotPageMember,PivotRowMember,andPivotTotal.
ThePivotFieldobject'sFilterContextproperty.
ThePivotFieldsobject’sItemproperty.
ThePivotFieldSetobject’sAddCalculatedFieldandAddCustomGroupFieldmethods,andBoundFieldproperty.
ThePivotResultFieldandPivotResultGroupFieldobjects'SourceFieldproperty.
![Page 289: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/289.jpg)
PivotFieldSetObject
Multipleobjects PivotFieldSetMultipleobjects
Representsasetoffieldsthathavebeenlockedtogethertoformahierarchy.Forexample,inafieldsetforgeography,thefieldsmightbeContinent,Country/Region,State,andCity—inthatorder.Typically,afieldsetwillonlycontainasinglefieldifthedatasourceisarecordset.
![Page 290: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/290.jpg)
UsingthePivotFieldSetObjectThefollowingpropertiesandmethodreturnaPivotFieldSetobject:
ThePivotFieldobject’sFieldSetproperty.
ThePivotFieldSetsobject’sItemproperty.
ThePivotViewobject'sAddFieldSetmethod.
![Page 291: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/291.jpg)
PivotFilterAxisObject
Multipleobjects PivotFilterAxisMultipleobjects
RepresentsthefilteraxisinaPivotTablelist.
![Page 292: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/292.jpg)
UsingthePivotFilterAxisObjectThefollowingpropertiesreturnaPivotFilterAxisobject:
ThePivotViewobject’sFilterAxisproperty
ThePivotResultFilterAxisobject'sSourceFilterAxisproperty
![Page 293: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/293.jpg)
PivotFontObject
Multipleobjects PivotFont
Containsthefontattributes(fontname,fontsize,color,andsoon)forthespecifiedobject.
![Page 294: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/294.jpg)
UsingthePivotFontObjectThefollowingpropertiesreturnaPivotFontobject:
ThePivotFieldobject’sDetailFont,GroupedFont,andSubtotalFontproperties
ThePivotLabelobject’sFontproperty
ThePivotViewobject’sFieldLabelFont,HeaderFont,PropertyCaptionFont,PropertyValueFont,andTotalFontproperties
![Page 295: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/295.jpg)
PivotGroupAxisObject
Multipleobjects PivotGroupAxisMultipleobjects
RepresentsthegroupaxisinaPivotTablelist.
![Page 296: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/296.jpg)
UsingthePivotGroupAxisObjectThefollowingpropertiesreturnaPivotGroupAxisobject:
ThePivotResultColumnAxisobject'sSourceColumnAxisproperty
ThePivotResultPageAxisobject'sSourcePageAxisproperty
ThePivotResultRowAxisobject'sSourceRowAxisproperty
ThePivotViewobject’sColumnAxis,PageAxis,andRowAxisproperties
![Page 297: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/297.jpg)
PivotHyperlinkObject
Multipleobjects PivotHyperlink
RepresentsahyperlinkinaPivotTablelist.
![Page 298: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/298.jpg)
UsingthePivotHyperlinkobjectUsetheHyperlinkpropertyofthePivotDetailCell,PivotAxisMember,PivotColumnMember,PivotRowMemberorPivotPageMemberobjectstoreturnaPivotHyperlinkobject.
ThePivotTablecontrolwilltreatfieldmembersashyperlinkswhentheIsHyperlinkpropertyofthefieldissettoTrue.
UsetheAddresspropertytoreturntheaddressforaPivotHyperlinkobject.TheAddresspropertyofaPivotHyperlinkobjectisread-only.YoumustupdatethedatabaseitselftochangetheaddressofahyperlinkinaPivotTablelist.UsetheFollowmethodtoresolve,download,anddisplaythetargetdocument.
![Page 299: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/299.jpg)
PivotLabelObject
Multipleobjects PivotLabelPivotFont
Representsthelabelforthespecifiedobject.Containsformatattributes(foregroundcolor,backgroundcolor,font,andsoon).
![Page 300: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/300.jpg)
UsingthePivotLabelObjectThefollowingpropertiesreturnaPivotLabelobject:
ThePivotAxisobject’sLabelproperty
ThePivotDataAxisobject’sLabelproperty
ThePivotFilterAxisobject’sLabelproperty
ThePivotGroupAxisobject’sLabelproperty
ThePivotResultLabelobject'sSourceLabelproperty
ThePivotViewobject’sLabelproperty
ThePivotViewobject’sTitleBarproperty
![Page 301: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/301.jpg)
PivotMemberObject
Multipleobjects PivotMemberMultipleobjects
Representsthevaluesdisplayedforagroupedfield.
![Page 302: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/302.jpg)
UsingthePivotMemberObjectThefollowingpropertiesandmethodreturnaPivotMemberobject:
TheFindMemberpropertyofthefollowingobjects:PivotAxisMember,PivotColumnMember,PivotFieldSet,PivotPageMember,orPivotRowMember
TheParentMemberpropertyofthefollowingobjects:PivotAxisMember,PivotColumnMember,PivotMember,PivotPageMember,orPivotRowMember
TheSourceMemberpropertyofthefollowingobjects:PivotAxisMember,PivotColumnMember,PivotPageMember,orPivotRowMember
ThePivotFieldobject'sAddCustomGroupMembermethod
ThePivotFieldSetobject'sAllMemberorMemberproperties
ThePivotMembersobject’sItemproperty
![Page 303: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/303.jpg)
PivotMemberPropertyObject
Multipleobjects PivotMemberProperty
RepresentsamemberpropertyforaPivotTablemember.AmemberpropertyisacustompropertythathasbeendefinedforthememberinanOLAPcube.
![Page 304: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/304.jpg)
UsingthePivotMemberPropertyobjectThefollowingpropertiesreturnaPivotMemberPropertyobject:
ThePivotMemberPropertiescollection'sItemproperty
ThePivotResultMemberPropertyobject'sMemberPropertyproperty
UsetheDisplayInpropertytocontrolwhetherthespecifiedmemberpropertyisdisplayedinthePivotTablelist,ScreenTip,boththePivotTablelistandScreenTip,ornotatall.UsetheCaptionpropertytosetthecaptionforamemberproperty.
Thefollowingexamplesetsthecaptionsof,andthendisplaysthemembercaptionsoftheStoreNamefield.
SubDisplayMemberProperties()
DimptViewDimptConstantsDimfldStoreName
SetptConstants=PivotTable1.Constants
'SetavariabletotheactiveviewofthePivotTable.SetptView=PivotTable1.ActiveView
'SetavariabletotheStoreNamefield.SetfldStoreName=ptView.FieldSets("Store").Fields("StoreName")
'Thefollowingthreelinesofcodespecifythatthememberpropertiesare'displayedinthePivotTablelist.fldStoreName.MemberProperties("StoreManager").DisplayIn=ptConstants.plDisplayPropertyInReportfldStoreName.MemberProperties("StoreType").DisplayIn=ptConstants.plDisplayPropertyInReportfldStoreName.MemberProperties("StoreSqft").DisplayIn=ptConstants.plDisplayPropertyInReport
![Page 305: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/305.jpg)
'Thefollowingthreelinesofcodesetthecaptionforthememberproperties.fldStoreName.MemberProperties("StoreManager").Caption="ManagerName"fldStoreName.MemberProperties("StoreType").Caption="StoreType"fldStoreName.MemberProperties("StoreSqft").Caption="SizeinSQFT"
EndSub
![Page 306: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/306.jpg)
PivotPageMemberObject
Multipleobjects PivotPageMemberMultipleobjects
RepresentsthevaluesdisplayedforagroupedfieldinthepageareaofaPivotTablelist.ThePivotPageMemberobjectisamemberofthePivotPageMemberscollection.
![Page 307: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/307.jpg)
UsingthePivotPageMemberobjectThefollowingpropertiesreturnaPivotRowMemberobject:
ThePivotCellobject'sPageMemberproperty
ThePivotResultPageAxisobject'sPageMemberproperty
ThePivotPageMemberobject'sFindPageMemberproperty
ThePivotPageMemberobject'sParentPageMemberproperty
ThePivotPageMemberobject'sTotalPageMemberproperty
ThePivotPageMembercollection'sItemproperty
ThePivotPageMemberobjecthasmanypropertiesincommonwiththePivotAxisMemberobject.
![Page 308: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/308.jpg)
PivotRangeObject
PivotData PivotRangeMultipleobjects
RepresentsarangeofcellsinaPivotTablelist.
![Page 309: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/309.jpg)
UsingthePivotRangeObjectThePivotDataobject’sRangepropertyreturnsaPivotRangeobject.
![Page 310: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/310.jpg)
PivotResultAxisObject
Multipleobjects PivotResultAxisMultipleobjects
ContainspointerstothedataforaresultaxisinaPivotTablelist.
![Page 311: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/311.jpg)
UsingthePivotResultAxisobjectThefollowingpropertiesreturnaPivotResultAxisobject:
ThePivotResultFieldobject'sAxisproperty.
ThePivotResultGroupFieldobject'sAxisproperty.
UsetheDatapropertytorefertothedata.UsetheSourceAxispropertytorefertothesourceaxis.
![Page 312: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/312.jpg)
PivotResultColumnAxisObject
PivotData PivotResultColumnAxisMultipleobjects
RepresentsthedataincolumnaxisofaPivotTablelist.
![Page 313: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/313.jpg)
UsingthePivotResultColumnAxisobjectTheColumnAxispropertyofthePivotDataobjectreturnsaPivotResultColumnAxisobject.
UsetheDatapropertytoreturnapointertothedata.
UsetheSourceColumnAxispropertytoreturnapointertotheaxis.
![Page 314: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/314.jpg)
PivotResultDataAxisObject
PivotData PivotResultDataAxisMultipleobjects
RepresentsthedataaxisofaPivotTablelist.
![Page 315: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/315.jpg)
UsingthePivotResultDataAxisobjectTheDataAxispropertyofthePivotDataobjectreturnsaPivotResultDataAxisobject.
UsetheDatapropertytoreturnapointertothedata.
UsetheSourceDataAxispropertytoreturnapointertotheaxis.
![Page 316: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/316.jpg)
PivotResultFieldObject
PivotResultField Multipleobjects
Pointstothesourcefieldandaxisofaresultfield.
![Page 317: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/317.jpg)
UsingthePivotResultFieldobjectUsetheSourceAxispropertyoftheobjectreturnedbytheAxispropertytorefertothesourceaxisfortheresultfield.
UsetheSourceFieldpropertytorefertothesourcefieldfortheresultfield.
![Page 318: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/318.jpg)
PivotResultFilterAxisObject
PivotData PivotResultFilterAxisMultipleobjects
RepresentsthedataofthefilteraxisofaPivotTablelist.
![Page 319: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/319.jpg)
UsingthePivotResultFilterAxisobjectTheFilterAxispropertyofthePivotDataobjectreturnsaPivotResultFilterAxisobject.
UsetheDatapropertytoreturnapointertothedata.
UsetheSourceFilterAxispropertytoreturnapointertotheaxis.
![Page 320: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/320.jpg)
PivotResultGroupAxisObject
Multipleobjects PivotResultGroupAxisMultipleobjects
RepresentsthedatainthegroupingaxisofaPivotTablelist.
![Page 321: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/321.jpg)
UsingthePivotResultGroupAxisobjectThefollowingpropertiesreturnaPivotResultGroupAxisobject:
TheChCategoryLabelsobject'sPivotAxisproperty
TheChSeriesCollectionobject'sPivotAxisproperty
ThePivotAxisMemberobject'sAxisproperty
ThePivotColumnMemberobject'sAxisproperty
ThePivotRowMemberobject'sAxisproperty
ThePivotPageMemberobject'sAxisproperty
UsetheDatapropertytoreturnapointertothedata.
UsetheSourceAxispropertytoreturnapointertotheaxis.
![Page 322: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/322.jpg)
PivotResultGroupFieldObject
Multipleobjects PivotResultGroupFieldMultipleobjects
Representsthegroupingfieldforaresultmember.
![Page 323: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/323.jpg)
UsingthePivotResultGroupFieldobjectThefollowingpropertiesreturnaPivotResultGroupFieldobject:
ThePivotResultGroupFieldscollection'sItemproperty.
ThePivotAxisMemberobject'sGroupFieldproperty.
ThePivotColumnMemberobject'sGroupFieldproperty.
ThePivotPageMemberobject'sGroupFieldproperty.
ThePivotRowMemberobject'sGroupFieldproperty.
UsethePivotResultAxisobjectreturnedbythetheAxispropertytoconfigurethesourceaxis.
UsethePivotFieldobjectreturnedbytheSourceFieldpropertytoconfigurethesourcefield.
![Page 324: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/324.jpg)
PivotResultLabelObject
Multipleobjects PivotResultLabelPivotLabel
Representsthelabelforaresultaxis.
![Page 325: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/325.jpg)
UsingthePivotResultLabelobjectThefollowingpropertiesreturnaPivotResultLabelobject:
ThePivotDataobject'sLabelproperty
ThePivotResultAxisobject'sLabelproperty
ThePivotResultColumnAxisobject'sLabelproperty
ThePivotResultDataAxisobject'sLabelproperty
ThePivotResultFilterAxisobject'sLabelproperty
ThePivotResultGroupAxisobject'sLabelproperty
ThePivotResultPageAxisobject'sLabelproperty
ThePivotResultRowAxisobject'sLabelproperty
UsethePivotLabelobjectreturnedbytheSourceLabelpropertytoformattheresultlabel.
![Page 326: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/326.jpg)
PivotResultMemberPropertyObject
Multipleobjects PivotResultMemberPropertiesPivotResultMemberPropertyPivotMemberProperty
Representsamemberpropertyforaresultmember.
![Page 327: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/327.jpg)
UsingthePivotResultMemberPropertyobjectTheItempropertyofthePivotResultMemberPropertiescollectionreturnsaPivotResultMemberPropertyobject.
UsethePivotMemberPropertyobjectreturnedbytheMemberPropertypropertytoaccessthesettingsforthememberproperty.
![Page 328: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/328.jpg)
PivotResultPageAxisObject
PivotData PivotResultPageAxisMultipleobjects
RepresentsthedatatheofrowaxisofaPivotTablelist.
![Page 329: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/329.jpg)
UsingthePivotResultPageAxisobjectThePageAxispropertyofthePivotDataobjectreturnsaPivotResultPageAxisobject.
UsetheDatapropertytoreturnapointertothedata.
UsetheSourcePageAxispropertytoreturnapointertotheaxis.
![Page 330: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/330.jpg)
PivotResultRowAxisObject
PivotData PivotResultRowAxisMultipleobjects
RepresentsthedatatheofrowaxisofaPivotTablelist.
![Page 331: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/331.jpg)
UsingthePivotResultRowAxisobjectTheRowAxispropertyofthePivotDataobjectreturnsaPivotResultRowAxisobject.
UsetheDatapropertytoreturnapointertothedata.
UsetheSourceRowAxispropertytoreturnapointertotheaxis.
![Page 332: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/332.jpg)
PivotRowMemberObject
Multipleobjects PivotRowMemberMultipleobjects
RepresentsthevaluesdisplayedforagroupedfieldintherowareaofaPivotTablelist.ThePivotRowMemberobjectisamemberofthePivotRowMemberscollection.
![Page 333: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/333.jpg)
UsingthePivotRowMemberobjectThefollowingpropertiesreturnaPivotRowMemberobject:
ThePivotCellobject'sRowMemberproperty.
ThePivotResultRowAxisobject'sRowMemberproperty.
ThePivotRowMemberobject'sFindRowMemberproperty.
ThePivotRowMemberobject'sParentRowMemberproperty.
ThePivotRowMemberobject'sTotalRowMemberproperty.
ThePivotRowMembercollection'sItemproperty.
ThePivotDataobject'sTopproperty.
ThePivotRowMemberobjecthasmanypropertiesincommonwiththePivotAxisMemberobject.UsetheTotalRowHeightandTotalRowMemberpropertiestocustomizethewaytotalsaredisplayed.
![Page 334: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/334.jpg)
PivotTableObject
PivotTable Multipleobjects
RepresentsthecontainerforaPivotTablelist.
![Page 335: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/335.jpg)
UsingthePivotTableObjectYoucanuseeithertheCreateObjectmethodortheNewkeywordtocreateaPivotTableobject.
TheobjectIDforaPivotTablelistonanHTMLpagereturnsaPivotTableobject.TheprogrammaticidentifierforthePivotTableobjectisCLSID:0002E55A-0000-0000-C000-000000000046.ThefollowingexamplecreatesaPivotTablelistnamed"PivotTable1"onanHTMLpage.
<objectid=PivotTable1classid=CLSID:0002E55A-0000-0000-C000-000000000046></object>
![Page 336: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/336.jpg)
PivotTotalObject
Multipleobjects PivotTotalMultipleobjects
RepresentsatotalinaPivotTablelist.Atotalistheaggregatevaluethatisdisplayedforthecontentsofagivencell.
![Page 337: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/337.jpg)
UsingthePivotTotalObjectThefollowingpropertiesandmethodsreturnaPivotTotalobject:
ThePivotAggregateobject'sTotalproperty
ThePivotFieldobject'sFilterOnandSortOnproperties
ThePivotTotalsobject'sItemproperty
ThePivotViewobject'sAddCalculatedTotalandAddTotalmethods
![Page 338: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/338.jpg)
PivotViewObject
Multipleobjects PivotViewMultipleobjects
RepresentsaspecificviewofaPivotTablelist.
![Page 339: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/339.jpg)
UsingthePivotViewObjectTheViewpropertyofthefollowingobjectsreturnsaPivotViewobject:PivotAxis,PivotAxisMember,PivotColumnMember,PivotData,PivotDataAxis,PivotFieldSet,PivotFilterAxis,PivotGroupAxis,PivotMember,PivotPageMember,PivotRowMember,andPivotTotal.
ThePivotTableobject’sActiveViewpropertyalsoreturnsaPivotViewobject.
![Page 340: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/340.jpg)
ProtectionObject
Worksheet ProtectionWorksheet
Containstheprotectionpropertiesforaworksheet.
![Page 341: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/341.jpg)
UsingtheProtectionObjectTheWorksheetobject’sProtectionpropertyreturnsaProtectionobject.
![Page 342: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/342.jpg)
RangeObject
Multipleobjects RangeMultipleobjects
Representsacell,arangeofcells,arow,oracolumn.
![Page 343: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/343.jpg)
UsingtheRangeObjectThefollowingpropertiesandmethodsreturnaRangeobject.
Object Properties/MethodsAutoFilter RangeListObject DataBodyRange
HeaderRowRangeInsertRowRangeRange
ListRow RangeName RefersToRangePane VisibleRangeRange Cells
ColumnsCurrentArrayCurrentRegionEndEntireColumnEntireRowFindFindNextFindPreviousItemMergeAreaNextOffsetPreviousRangeRows
Spreadsheet ActiveCell
![Page 344: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/344.jpg)
CellsColumnsRangeRectIntersectRectUnionRowsSelection
Window ActiveCellRangeFromPointRangeSelectionSelectionVisibleRange
Worksheet CellsColumnsRangeRowsUsedRange
![Page 345: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/345.jpg)
RecordNavigationControlObject
RecordNavigationControl
Representsarecordnavigationcontrol.
![Page 346: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/346.jpg)
UsingtheRecordNavigationControlObjectYoucanuseeithertheCreateObjectmethodortheNewkeywordtocreateaRecordNavigationControlobject.
TheobjectIDforarecordnavigationcontrolonanHTMLpagereturnsaRecordNavigationControlobject.TheprogrammaticidentifierfortheRecordNavigationControlobjectisCLSID:0002E55C-0000-0000-C000-000000000046.Thefollowingexamplecreatesarecordnavigationcontrolnamed"RNC1"onanHTMLpage.
<objectid=RNC1classid=CLSID:0002E55C-0000-0000-C000-000000000046></object>
![Page 347: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/347.jpg)
RecordsetDefObject
Multipleobjects RecordsetDefMultipleobjects
Representsarecordsetdefinition.
![Page 348: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/348.jpg)
UsingtheRecordsetDefObjectThefollowingpropertiesreturnaRecordsetDefobject:
ThePageFieldobject'sRecordsetDefproperty
ThePageRowsourceobject'sRecordsetDefproperty
TheRecordsetDefobject'sParentRecordsetDefproperty
TheRecordsetDefsobject'sItemproperty,anditsAddandAddNewmethods
![Page 349: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/349.jpg)
SchemaFieldObject
SchemaRowsource SchemaFieldsSchemaFieldSchemaProperties
Representsafieldinaschemarowsource.ThenamesofthesefieldsareusedingeneratingSELECTstatementsforrowsourcesoftypedscTableordscView.TheSchemaFieldobjectisamemberoftheSchemaFieldscollection.
![Page 350: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/350.jpg)
UsingtheSchemaFieldObjectThefollowingmethodandpropertyreturnaSchemaFieldobject:
TheSchemaFieldscollection'sAddmethod
TheSchemaFieldscollection'sItemproperty
![Page 351: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/351.jpg)
SchemaParameterObject
SchemaRowsource SchemaParametersSchemaParameterSchemaProperties
Representsasingleparameterforaschemarowsource.TheSchemaParameterobjectisamemberoftheSchemaParameterscollection.
![Page 352: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/352.jpg)
UsingtheSchemaParameterObjectThefollowingmethodandpropertyreturnaSchemaParameterobject:
TheSchemaParameterscollection'sAddmethod
TheSchemaParameterscollection'sItemproperty
![Page 353: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/353.jpg)
SchemaPropertiesObject
Multipleobjects SchemaPropertiesSchemaProperty
Thisobjectisnotdocumented.
![Page 354: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/354.jpg)
SchemaPropertyObject
Multipleobjects SchemaPropertiesSchemaProperty
Thisobjectisnotdocumented.
![Page 355: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/355.jpg)
SchemaRelatedFieldObject
SchemaRelationship SchemaRelatedFieldsSchemaRelatedField
Describesthecolumnpairingsthatmakeupaschemarelationship.ThenamesofthesefieldsareusedingeneratingjoinclausesinSQLandfortyingaparentrecordsetdefinitiontoasublistchildrecordsetdefinition.TheSchemaRelatedFieldobjectisamemberoftheSchemaRelatedFieldscollection.
![Page 356: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/356.jpg)
UsingtheSchemaRelatedFieldThefollowingmethodandpropertyreturnaSchemaRelatedFieldobject:
TheSchemaRelatedFieldscollection'sAddmethod
TheSchemaRelatedFieldscollection'sItemproperty
![Page 357: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/357.jpg)
SchemaRelatedFieldsCollectionObject
SchemaRelationship SchemaRelatedFieldsSchemaRelatedField
ThecollectionofSchemaRelatedFieldobjectsforaschemarelationship.
![Page 358: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/358.jpg)
UsingtheSchemaRelatedFieldsCollectionTheSchemaRelationshipobject'sSchemaRelatedFieldspropertyreturnsaSchemaRelatedFieldscollection.
![Page 359: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/359.jpg)
SchemaRelationshipObject
Multipleobjects SchemaRelationshipSchemaRelatedFields
Representsaschemarelationship.Aschemarelationshipdescribeshowschemarowsourcesareconnected,anditalwayshasa“one”sideanda“many”side(fromaone-to-manyrelationship).TheSchemaRelationshipobjectisamemberoftheSchemaRelationshipscollection.
![Page 360: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/360.jpg)
UsingtheSchemaRelationshipObjectThefollowingpropertiesandmethodreturnaSchemaRelationshipobject:
TheLookupSchemaRelationshipscollection'sItemproperty
TheSchemaRelationshipscollection'sAddandAddNewmethods,andItemproperty
TheSublistSchemaRelationshipscollection'sItemproperty
![Page 361: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/361.jpg)
SchemaRowsourceObject
Multipleobjects SchemaRowsourcesSchemaRowsourceMultipleobjects
Representsaschemarowsource.Everytable,view,orstoredprocedureinthedatabaseisapotentialschemarowsource,asarecommandsdefinedexplicitlytothedatasourcecontrol.
TheSchemaRowsourceobjectisamemberoftheSchemaRowsourcescollection.
![Page 362: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/362.jpg)
UsingtheSchemaRowsourceObjectThefollowingmethodandpropertyreturnaSchemaRowsourceobject:
TheSchemaRowsourcescollection'sAddandAddNewmethods
TheSchemaRowsourcescollection'sItemproperty.
![Page 363: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/363.jpg)
SectionObject
Multipleobjects SectionMultipleobjects
Aninstanceofasinglegroupheader,footer,caption,ornavigationsection.
![Page 364: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/364.jpg)
UsingtheSectionObjectThefollowingpropertiesandmethodreturnaSectionobject:
Object Properties/MethodDataPage FirstSectionDataSourceControl CurrentSection
GetContainingSectionDSCEventInfo SectionSection ChildSection
NextSectionNextSiblingParentSectionPreviousSectionPreviousSibling
![Page 365: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/365.jpg)
SpreadsheetObject
Spreadsheet Multipleobjects
Representsthecontainerforthespreadsheet.
![Page 366: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/366.jpg)
UsingtheSpreadsheetObjectYoucanusetheCreateObjectmethodortheNewkeywordtocreateaSpreadsheetobject.
TheobjectIDforaspreadsheetcontrolonanHTMLpageoraVisualBasicformreturnsaSpreadsheetobject.
TheprogrammaticidentifierfortheSpreadsheetobjectisCLSID:0002E559-0000-0000-C000-000000000046.Thefollowingexamplecreatesaspreadsheetnamed"Spreadsheet1"onanHTMLpage.
<objectid=Spreadsheet1classid=CLSID:0002E559-0000-0000-C000-000000000046style="width:49%;height:350"></object>
![Page 367: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/367.jpg)
TitleBarObject
Multipleobjects TitleBarMultipleobjects
Representsthetitlebaronthespreadsheet.
![Page 368: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/368.jpg)
UsingtheTitleBarObjectTheSpreadsheetobject’sTitleBarpropertyreturnsaTitleBarobject.
![Page 369: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/369.jpg)
WindowObject
Multipleobjects WindowMultipleobjects
Representsawindow.Manyworksheetcharacteristics,suchasscrollbarsandgridlines,areactuallypropertiesofthewindow.TheWindowobjectisamemberoftheWindowscollection.EachworksheethasauniqueWindowobject.Codecanonlyaccessthewindowfortheactivesheetoftheworkbook.Inotherwords,althoughtheWindowscollectionstatesthatthereisonlyoneWindowobject,thereare,infact,multipleWindowobjects,butyoumayonlyaccesstheWindowobjectfortheactivesheet.
![Page 370: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/370.jpg)
UsingtheWindowobjectThefollowingpropertiesreturnaWindowobject.
TheSpreadsheetobject'sActiveWindowproperty.
TheWindowscollection'sItemproperty.
ThefollowingexamplehidestherowandcolumnheadingsintheactivewindowofSpreadsheet1.
SubHideHeadings()
Spreadsheet1.ActiveWindow.DisplayColumnHeadings=FalseSpreadsheet1.ActiveWindow.DisplayRowHeadings=False
EndSub
ThefollowingexamplemovescolumnCsothatit'stheleftmostcolumninthewindow.
Spreadsheet1.ActiveWindow.ScrollColumn=3
![Page 371: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/371.jpg)
WorkbookObject
Multipleobjects WorkbookMultipleobjects
Representsaworkbook.TheWorkbookobjectisamemberoftheWorkbookscollection.
![Page 372: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/372.jpg)
UsingtheWorkbookobjectUsetheActiveWorkbookpropertyoftheSpreadsheetobjecttoreturnareferencetotheopenworkbook.
AworkbookcontainsaWorksheetscollection.
![Page 373: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/373.jpg)
WorksheetObject
Multipleobjects WorksheetMultipleobjects
Representsasingleworksheetinaworkbook.
![Page 374: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/374.jpg)
UsingtheWorksheetObjectThefollowingpropertiesreturnaWorksheetobject:
TheRangeobject’sWorksheetproperty
TheSpreadsheet,Window,andWorkbookobjects'ActiveSheetproperty
TheWorksheetobject'sNextandPreviousproperties
TheWorksheetscollection'sAddmethodandItemproperty
![Page 375: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/375.jpg)
XmlDataBindingObject
XmlDataBindings XmlDataBindingMultipleobjects
AnXmlDataBindingobjectrepresentsanXMLdatabindinginaSpreadsheetcomponent.Youcanbind,orconnect,aSpreadsheetcomponenttoadataretrievalservice,SOAPWebService,XMLfile,orWebPart,andthatbindingisrepresentedbytheXmlDataBindingobject.
![Page 376: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/376.jpg)
UsingtheXmlDataBindingObjectTheXMLDataBindingobjectisamemberoftheXmlDataBindingscollection,whichisacollectionofalloftheXmlDataBindingobjectsinaSpreadsheetcomponent.Withinthecollection,individualXmlDataBindingobjectsareindexedbeginningwith1forthefirstobject,2forthesecond,andsoon.YoucanreturnaXmlDataBindingobjectfromtheXmlDataBindingscollectionbyusingtheItempropertyofthecollection.TheargumentfortheItempropertyistheindexinthecollectionoftheobjectyouwanttoreturnorthebindingIDoftheobject.ThebindingIDisthevalueoftheIDattributeintheXMLthatrepresentsthebinding.YoucanfindthisintheXMLSpreadsheetfilefortheSpreadsheetcomponent(orSpreadsheetWebPart)orbyexaminingtheBindingDatapropertyoftheXmlDataBindingobject.YoucancreateanXMLSpreadsheetfilebycreatingadataboundspreadsheetusingMicrosoftExcelandthensavingtheworkbookasanXMLSpreadsheet.
YoucreateanewXmlDataBindingobjectusingtheAddmethodoftheXmlDataBindingscollection.OnceyouhavecreatedtheXmlDataBindingobject,youcanuseitsBindingDatapropertytospecifybindingconfigurationinformation.
ThefollowingexampleshowshowtoworkwitheachXmlDataBindingobjectrelatedtoaSpreadsheetcomponent:
DimobjBindingsDimobjBindingDimstrBindingInfo
SetobjBindings=Spreadsheet1.ActiveWorkbook.XmlDataBindings
ForEachobjBindinginobjBindings'SavetheXMLbindinginformationtoavariable.strBindingInfo=objBinding.BindingData'Workwiththebindinginformationhere.Next
![Page 377: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/377.jpg)
XmlMapObject
Workbook XmlMapsXmlMapWorkbook
AnXmlMapobjectrepresentstheXMLschemamapforaSpreadsheetcomponent.TheXmlMapobjectisamemberoftheXmlMapscollection.
![Page 378: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/378.jpg)
UsingtheXmlMapObjectIntheXmlMapscollection,individualXmlMapobjectsareindexedbeginningwith1forthefirstobject,2forthesecondobject,andsoon.YoureturnaXmlMapobjectfromtheXmlMapscollectionusingtheItemproperty.TheargumentfortheItempropertyistheindexinthecollectionoftheobjectyouwanttoreturnorthemapIDoftheobject.ThemapIDisthevalueoftheIDattributeintheXMLthatrepresentsthemap.YoucanfindthisintheXMLSpreadsheetfileforthepartorbyexaminingtheMapDatapropertyoftheXmlMapobject.YoucancreateanXMLSpreadsheetfilebycreatingadata-boundspreadsheetinMicrosoftExcelandthensavingtheworkbookasanXMLSpreadsheet.YoucancreateanewXmlMapobjectbyusingtheAddmethodoftheXmlMapscollection.
ThefollowingexampleshowshowtoworkwitheachXmlMapobjectrelatedtoaSpreadsheetcomponent.ItusestheXmlMapspropertyoftheActiveWorkbookobjecttoreturntheXmlMapscollectionobject:
DimobjMapsDimobjMapDimstrMapInfo
SetobjMaps=Spreadsheet1.ActiveWorkbook.XmlMaps
ForEachobjMapinobjMaps'SavetheXMLmapinformationtoavariable.strMapInfo=objMap.MapData'WorkwiththemapinformationXMLhere.Next
![Page 379: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/379.jpg)
ShowAll
![Page 380: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/380.jpg)
ActivateMethod
ActivatemethodasitappliestotheRangeobject.
ActivatemethodasitappliestotheWorksheetobject.
![Page 381: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/381.jpg)
ExampleAsitappliestotheRangeobject.
AsitappliestotheWorksheetobject.
![Page 382: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/382.jpg)
ShowAll
![Page 383: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/383.jpg)
AddMethod
AddmethodasitappliestotheChAxesobject.
AddmethodasitappliestotheChChartsobject.
AddmethodasitappliestotheChDataLabelsCollectionobject.
AddmethodasitappliestotheChErrorBarsCollectionobject.
AddmethodasitappliestotheChSegmentsobject.
AddmethodasitappliestotheChSeriesCollectionobject.
AddmethodasitappliestotheChTrendlinesobject.
AddmethodasitappliestotheElementExtensionsobject.
AddmethodasitappliestotheGroupingDefsobject.
![Page 384: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/384.jpg)
AddmethodasitappliestotheGroupLevelsobject.
AddmethodasitappliestotheSheetsandWorksheetsobjects.
![Page 385: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/385.jpg)
AddmethodasitappliestothePageFieldsobject.
![Page 386: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/386.jpg)
AddmethodasitappliestotheLookupRelationshipsandSublistRelationshipsobjects.
![Page 387: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/387.jpg)
AddmethodasitappliestotheParameterValuesobject.
AddmethodasitappliestotheRecordsetDefsobject.
![Page 388: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/388.jpg)
AddmethodasitappliestotheSchemaFieldsobject.
![Page 389: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/389.jpg)
AddmethodasitappliestotheSchemaParametersobject.
![Page 390: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/390.jpg)
AddmethodasitappliestotheSchemaRelatedFieldsobject.
![Page 391: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/391.jpg)
AddmethodasitappliestotheSchemaRelationshipsobject.
![Page 392: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/392.jpg)
AddmethodasitappliestotheSchemaRowsourcesobject.
![Page 393: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/393.jpg)
AddmethodasitappliestotheCriteriaobject.
AddmethodasitappliestotheNamesobject.
AddmethodasitappliestotheListRowscollection.
AddmethodasitappliestotheXmlDataBindingscollection.
![Page 394: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/394.jpg)
AddmethodasitappliestotheXmlMapscollection.
![Page 395: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/395.jpg)
ExampleAsitappliestotheChChartsobject.
AsitappliestotheChDataLabelsCollectionobject.
AsitappliestotheChErrorBarsCollectionobject.
AsitappliestotheChSeriesCollectionobject.
AsitappliestotheChTrendlinesobject.
AsitappliestotheCriteriaobject.
![Page 396: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/396.jpg)
AddCalculatedFieldMethod
AddsacalculatedfieldtoaPivotTable.Acalculatedfieldcanbeusedlikeanyotherfieldforsorting,filtering,orgrouping.YoumustusetheAddFieldSetmethodtocreateacustomfieldsetbeforeyouaddacalculatedfield.ReturnsaPivotFieldobject.
expression.AddCalculatedField(Name,Caption,DataField,Expression)
expressionRequired.AnexpressionthatreturnsaPivotFieldSetobjectthatwascreatedbytheAddFieldSetmethod.
NameRequiredString.Thenameofthecalculatedfield.Thenamemustbeuniquewithinthefieldset.
CaptionRequiredString.ThecaptiondisplayedforthecalculatedfieldinthePivotTableuserinterface.Althoughthisargumentisrequired,youcanassignablankstringtothecaption.
DataFieldRequiredString.ThenameofthenewfieldthatiscreatedintheunderlyingrecordsetforthePivotTable.
ExpressionRequiredString.Theexpressionusedtocalculatetheitemsinthenewfield.TheexpressionmustbecompatiblewiththeJetexpressionservice.
![Page 397: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/397.jpg)
RemarksCustomfieldsetscancontainonlyonecalculatedfield.Addingasecondcalculatedfieldtoacustomfieldsetresultsinarun-timeerror.
![Page 398: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/398.jpg)
ExampleThisexampleaddsanewfieldsetnamed"Variance"toPivotTable1.Withinthenewfieldset,acalculatedfieldwiththecaption"BudgetVariance"iscreated.ThecalculatedfieldistheninsertedintothePivotTableview.
SubTestAddFieldSet()
DimvwViewDimfsNewFieldSet
SetvwView=PivotTable1.ActiveView
'AddacustomfieldsettothePivotTable.SetfsNewFieldSet=vwView.AddFieldSet("Variance")
'Addacalculatedtotaltothenewlycreatedfieldset.fsNewFieldSet.AddCalculatedField"Variance",_
"BudgetVariance","fldVariance",_
"Budget/Actual"
'Insertthecalculatedfieldintothedataaxis.vwView.DataAxis.InsertFieldSetfsNewFieldSet
EndSub
![Page 399: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/399.jpg)
AddCalculatedTotalMethod
AddsacalculatedtotaltoaPivotTable.UsetheAddCalculatedTotalmethodtocreateacustomtotalbasedontotalsalreadydefinedinthePivotTable.ThecalculatedtotalisreturnedasaPivotTotalobject.
expression.AddCalculatedTotal(Name,Caption,Expression,SolveOrder)
expressionRequired.AnexpressionthatreturnsaPivotViewobject.
NameRequiredString.UsedtoidentifythenewcalculatedtotalinthePivotTotalscollection.ThisparametermustbeuniquewithinthePivotTotalscollection.Mustbebetween1and50charactersinlength.
CaptionRequiredString.UsedtoidentifythenewcalculatedtotalinthePivotTableuserinterface.
ExpressionRequiredString.Theexpressionusedtocalculatethenewcalculatedtotal.Mustbeavalidmultidimensionalexpression(MDX)statementfortheOLEDBproviderthatisbeingusedtoaccessthedata.
SolveOrderOptionalLong.IndicatesthesolveorderofthenewcalculatedtotalwhenthePivotTableisrefreshed.TheSolveOrderparameterisusefulifyoucreateacalculatedtotalthatisdependentoncalculatedtotalsthatwerecreatedearlier.
![Page 400: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/400.jpg)
ExampleThefollowingexampleaddsacalculatedtotalnamed"SalesinLastPeriod"toaPivotTablenamed"PivotTable1."Thenewcalculatedtotaldisplaysthesalesintheprevioustimeperiod.TheexampleutilizestheFoodMartOLAPcubethatisinstalledwithMicrosoftSQLServer7.0OLAPServices.
SubTestAddCalculatedTotal()
DimstrExpDimtotCalcTotalDimvwView
SetvwView=PivotTable1.ActiveView
'TheMDXexpressionusedforthenewcalculatedtotal.strExp="([Measures].[StoreSales],Time.PrevMember)"
'Createthenewcalculatedtotal.SettotCalcTotal=vwView.AddCalculatedTotal_("SalesinLastPeriod","SalesinLastPeriod",strExp)
'InsertthecalculatedtotalinthedataareaofthePivotTable.vwView.DataAxis.InsertTotaltotCalcTotal
EndSub
![Page 401: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/401.jpg)
AddCustomGroupFieldMethod
Addsacustomgroupfieldtoafieldset.ReturnsaPivotFieldobject.
expression.AddCustomGroupField(Name,Caption,Before)
expressionRequired.AnexpressionthatreturnsaPivotFieldSetobject.
NameOptionalString.Thenameforthenewfield.
CaptionOptionalString.Thecaptiontodisplayforthenewfield.
BeforeOptionalVariant.Index,name,orreferencetothefield.
![Page 402: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/402.jpg)
RemarksOnceyouhaveusedthismethodtocreateacustomgroupfield,usetheAddCustomGroupMembermethodtoaddmemberstothegroup.
Notethatthecustomgroupfieldanditsmembersarecreatedattheclient,notthedatasource.
![Page 403: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/403.jpg)
ExampleThisexampleaddsacustomgroupfieldtotheTimefieldset,andthenaddstwomemberstothefield.
SubCreateCustomGroup()
DimfsTimeDimfsHalfYear
'SetavariabletotheTimefieldset.SetfsTime=PivotTable1.ActiveView.FieldSets("Time")
'Addacustomgroupfieldnamed"Group1"totheTimefieldset.SetfsHalfYear=fsTime.AddCustomGroupField("Group1","Group1",_"Quarter")'Addamembertothecustomfieldset.Thismemberincludesall"Q1"'and"Q2"membersunder1997.fsHalfYear.AddCustomGroupMemberfsTime.Member.Childmembers("1997").Name,_Array("Q1","Q2"),"1stHalf"
'Addamembertothecustomfieldset.Thismemberincludesall"Q3"'and"Q4"membersunder1997.fsHalfYear.AddCustomGroupMemberfsTime.Member.ChildMembers("1997").Name,_Array("Q3","Q4"),"2ndHalf"
EndSub
![Page 404: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/404.jpg)
AddCustomGroupMemberMethod
Addsamembertoacustomgroupfield.ReturnsaPivotMemberobject.
expression.AddCustomGroupMember(Parent,varChildMembers,bstrCaption)
expressionRequired.AnexpressionthatreturnsaPivotFieldobject.
ParentRequiredVariant.Name,uniquename,referencetotheparentmemberforthenewmember(s).
varChildMembersRequiredVariant.Arrayofmembernames,uniquenames,ormemberreferencestoaddtothenewcustomgroupmember.
bstrCaptionOptionalString.Thecaptiontodisplayforthenewmember.
![Page 405: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/405.jpg)
RemarksUsethismethodtopopulateafieldcreatedusingtheAddCustomGroupFieldmethod.
![Page 406: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/406.jpg)
ExampleThisexampleaddsacustomgroupfieldtotheTimefieldset,andthenaddstwomemberstothefield.
SubCreateCustomGroup()
DimfsTimeDimfsHalfYear
'SetavariabletotheTimefieldset.SetfsTime=PivotTable1.ActiveView.FieldSets("Time")
'Addacustomgroupfieldnamed"Group1"totheTimefieldset.SetfsHalfYear=fsTime.AddCustomGroupField("Group1","Group1",_"Quarter")'Addamembertothecustomfieldset.Thismemberincludesall"Q1"'and"Q2"membersunder1997.fsHalfYear.AddCustomGroupMemberfsTime.Member.Childmembers("1997").Name,_Array("Q1","Q2"),"1stHalf"
'Addamembertothecustomfieldset.Thismemberincludesall"Q3"'and"Q4"under1997.fsHalfYear.AddCustomGroupMemberfsTime.Member.ChildMembers("1997").Name,_Array("Q3","Q4"),"2ndHalf"
EndSub
![Page 407: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/407.jpg)
AddFieldSetMethod
AddsacustomfieldsettoaPivotTable.Onceyouhavecreatedacustomfieldset,youcanusetheAddCalculatedFieldmethodtodefineacustomfield.ReturnsaPivotFieldSetobject.
expression.AddFieldSet(Name)
expressionRequired.AnexpressionthatreturnsaPivotViewobject.
NameRequiredString.Specifiesthenameofthenewfieldset.ThenamemustbeuniquewithinthethePivotFieldSetscollection.Mustbebetween1and24charactersinlength.
![Page 408: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/408.jpg)
RemarksYoumustaddacalculatedfieldtothenewfieldsetbeforeyouaddittothecurrentPivotTableview.Customfieldsetscancontainonlyonecalculatedfield.Addingasecondcalculatedfieldtoacustomfieldsetresultsinarun-timeerror.
NoteYoucanaddacustomfieldsettoyourPivotTableifthePivotTableisconnectedtoanonlineanalyticalprocessing(OLAP)datasource,butthefieldsetwillnotworkwiththedatasource.
![Page 409: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/409.jpg)
ExampleThisexampleaddsacalculatedfieldnamed"Variance"toanewfieldsetinPivotTable1.ThecalculatedfieldistheninsertedintothePivotTableview.
SubTestAddFieldSet()DimvwViewDimfsNewFieldSet
SetvwView=PivotTable1.ActiveView
'AddacustomfieldsettothePivotTable.SetfsNewFieldSet=vwView.AddFieldSet("Variance")
'Addacalculatedtotaltothenewlycreatedfieldset.fsNewFieldSet.AddCalculatedField"Variance",_"BudgetVariance","fldVariance",_"Budget/Actual"
'Insertthecalculatedfieldintothedataaxis.vwView.DataAxis.InsertFieldSetfsNewFieldSet
EndSub
![Page 410: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/410.jpg)
AddInMethod
Addsanadd-intothespecifiedspreadsheet.
expression.AddIn(AddIn)
expressionAnexpressionthatreturnsaSpreadsheetobject.
AddInRequiredObject.Specifiestheadd-in.
![Page 411: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/411.jpg)
AddNewMethod
Createsanewschemarowsourceandarecordsetdefinition.ReturnsaRecordsetDefobject.
expression.AddNew(Source,RowsourceType,Name)
expressionAnexpressionthatreturnsaRecordsetDefsobject.
SourceRequiredString.SpecifiescommandtextforanewschemarowsourceoftypedscCommandTextordscCommandFile,orforthenameofatable,view,orstoredproceduretobeaddedasaschemarowsource.Formoreinformation,seetheHelptopicfortheCommandTextproperty.
RowsourceTypeOptionalVariant.Specifiesthetypeofthenewschemarowsource.CanbeoneofthedscRowsourceTypeEnumconstants.ThedefaultconstantisdscCommandText.
NameOptionalVariant.Specifiesthenameoftherecordsetdefinition,pagerowsource,andschemarowsourcecreatedbyusingtheAddNewmethod.IfyoudonotspecifythisargumentandthevalueoftheRowsourceTypeargumentisdscTable,dscView,ordscProcedure,thenewnameisthesameasthenamespecifiedintheSourceargument(withnumeralsautomaticallyappendedtoittomakeitunique,ifnecessary).IfyoudonotspecifythisargumentandthevalueoftheRowsourceTypeargumentisdscCommandTextordscCommandFile,thenewnameis"CommandN",whereNisoneormoreappendednumerals.
![Page 412: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/412.jpg)
RemarksPagefieldsarenormallycreatedwithnamesthatareuniquethroughoutthepagedatadefinition.However,whenapagefieldisaddedtoarecordsetdefinitionwhoseprimarypagerowsourceisoftypedscProcedure,dscCommandText,ordscCommandFile,thepagefieldnamemustbethesameastheschemafieldname.ThiscanresultinmultiplepagefieldobjectswiththesamenameintheAllPageFieldscollection.Todifferentiatebetweenobjectswiththesamename,youcanusetheexpressionAllPageFields("RecordsetdefName.PagefieldName")whereRecordsetdefNameisthenameoftherecordsetdefinition,andPagefieldNameisthenameofthepagefield.Notethatpagefieldnamesthemselvescannotcontainperiods.
![Page 413: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/413.jpg)
ShowAll
![Page 414: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/414.jpg)
AddTotalMethod
AddTotalmethodasitappliestotheGroupingDefsobject.
AddTotalmethodasitappliestothePivotViewobject.
![Page 415: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/415.jpg)
ExampleAsitappliestothePivotViewobject.
![Page 416: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/416.jpg)
ApplyMethod
AppliesthespecifiedAutoFilter.YoutypicallyusetheAutoFiltermethodtoturnontheAutoFilterandaddoneormorecriteriatoit;youcanthenusetheApplymethodtoapplythenewfilter.
expression.Apply
expressionAnexpressionthatreturnsanAutoFilterobject.
![Page 417: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/417.jpg)
ExampleThisexampleturnsontheAutoFilterfortherangeA1:C20,setsfiltersforcolumnsAandC,andthenappliesthefilters.
PrivateSubEnableAutoFilter()DimafFiltersDimafCol1DimafCol3
'TurnonAutoFilter.Spreadsheet1.Worksheets("Sheet1").Range("A1:C20").AutoFilter
'SetavariabletotheAutoFilterobject.SetafFilters=Spreadsheet1.Worksheets("sheet1").AutoFilter
SetafCol1=afFilters.Filters(1)SetafCol3=afFilters.Filters(3)
'AddacriteriathatexcludesbluefromcolumnA.afCol1.Criteria.Add"blue"
'AddacriteriathatexcludesgreenfromcolumnA.afCol1.Criteria.Add"green"
'Addacriteriathatexcludesyellowfromcolumnc.afCol3.Criteria.Add"yellow"
'Applythecriteria.afFilters.ApplyEndSub
![Page 418: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/418.jpg)
ApplyFilterMethod
Filterstherecordonadataaccesspagebaseduponthecurrentlyselectedfield.EquivalentinfunctionalitytotheFilterbySelectionbuttonontherecordnavigationcontrol.
expression.ApplyFilter
expressionRequired.AnexpressionthatreturnsaDataPageobject.
![Page 419: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/419.jpg)
RemarksThismethodreliesuponthecurrentselectiononthedataaccesspagetodeterminethefieldtofilterby.Therefore,youmustsetthefocustothefieldtosortby,whentheprocedurecontainingthismethodisinvokedbyacontrolonthedataaccesspage,suchasacommandbutton.
![Page 420: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/420.jpg)
ExampleThisexamplefiltersthedataaccesspagebaseduponthecurrentlydisplayeditemintheCategoryIDfield.
SubCommand0_onclick()
MSODSC.Datapages(0).FirstSection.HTMLContainer.Children("CategoryID").Focus
MSODSC.Datapages(0).ApplyFilter
EndSub
![Page 421: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/421.jpg)
AutoFilterMethod
DisplaysorhidestheAutoFilterdrop-downarrows.YoutypicallyusethismethodtoturnontheAutoFilterandaddoneormorecriteriatoit;youcanthenusetheApplymethodtoapplythenewfilter.
expression.AutoFilter(Field,Criteria1,Operator,Criteria2,VisibleDropDown)
expressionAnexpressionthatreturnsaRangeobject.
FieldOptionalVariant.Thisargumentisnotsupported.
Criteria1OptionalVariant.Thisargumentisnotsupported.
OperatorOptionalVariant.Thisargumentisnotsupported.
Criteria2OptionalVariant.Thisargumentisnotsupported.
VisibleDropDownOptionalVariant.Thisargumentisnotsupported.
![Page 422: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/422.jpg)
RemarksDonotconfusethismethodwiththeAutoFilterproperty.ThismethodappliestoaRangeobjectandturnsontheAutoFilter,whereastheAutoFilterpropertyreturnstheAutoFilterobjectforagivenworksheet.
![Page 423: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/423.jpg)
ExampleThisexampleturnsontheAutoFilterfortherangeA1:C20,setsfiltersforcolumnsAandC,andthenappliesthefilters.
SubApply_AutoFilter()DimafFiltersDimafCol1DimafCol3'TurnonAutoFilter.Spreadsheet1.Worksheets("Sheet1").Range("A1:C20").AutoFilter'SetavariabletotheAutoFilterobject.SetafFilters=Spreadsheet1.Worksheets("sheet1").AutoFilterSetafCol1=afFilters.Filters(1)SetafCol3=afFilters.Filters(3)'AddacriteriathatexcludesbluefromcolumnA.afCol1.Criteria.Add"blue"'AddacriteriathatexcludesgreenfromcolumnA.afCol1.Criteria.Add"green"'Addacriteriathatexcludesyellowfromcolumnc.afCol3.Criteria.Add"yellow"'Applythecriteria.afFilters.ApplyEndSub
![Page 424: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/424.jpg)
AutoFitMethod
Changesthewidthofthecolumnsintherangeortheheightoftherowsintherangetoachievethebestfit.
expression.AutoFit
expressionRequired.AnexpressionthatreturnsaRangeobject.Mustbearoworarangeofrows,oracolumnorarangeofcolumns.Otherwise,thismethodgeneratesanerror.
![Page 425: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/425.jpg)
ExampleThisexampleadjuststheselectedrowsandcolumnstothebestfit.
SubAutoFitSelection()
DimrngSelected
SetrngSelected=Spreadsheet1.Selection
rngSelected.Rows.AutoFitrngSelected.Columns.AutoFit
EndSub
![Page 426: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/426.jpg)
AutoLayoutMethod
ResetsthespecifiedPivotTablelisttoadefaultviewconfiguration.IfthePivotTableisboundtoarecordset,afieldsetisaddedtothedataaxisforeachfieldintherecordset.IfthePivotTableisboundtoanmultidimensionaldatasource,suchasanOLAPcube,allfieldsetsareremovedfromtheaxes,clearingthecurrentview.
expression.AutoLayout(MaxDataFields)
expressionAnexpressionthatreturnsaPivotViewobject.
MaxDataFieldsOptionalLong.Specifiesthemaximumnumberoffieldsthatcanbeaddedtothedataaxisifthedatamemberisarecordset.Ifthisargumentisnotspecifiedoriszero(0),thereisnolimittothenumberoffieldsthatwillbeadded.
![Page 427: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/427.jpg)
ExampleThisexampleresetstheactiveviewforPivotTable1.
PivotTable1.ActiveView.AutoLayout
![Page 428: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/428.jpg)
BeginObjectMethod
BeginsthedrawingsequenceforthespecifiedChChartDrawobject.
expression.BeginObject(id)
expressionRequired.AnexpressionthatreturnsaChChartDrawobject.
idRequiredLong.Setthisargumenttoauniqueidentifierthatwillsubsequentlybeusedtoidentifytheobjectbeingdrawn.Setto-1toidentifytheChChartDrawobjectthathasbeenpassedintoaneventprocedure.
![Page 429: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/429.jpg)
RemarksYoucancombinemultipledrawingelementsintoasingleuser-selectableitembyplacingthembetweencallstotheBeginObjectandEndObjectmethods.
![Page 430: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/430.jpg)
ExampleThisexampleusestheBeforeRendereventtocancelthedrawingofthegridlinesandtheplotareaofthefirstchartinChartspace1.TheAfterRenderEventthenreplacestheplotareawithanellipsethatisdrawnafterthechartisrendered.
PrivateSubChartSpace1_BeforeRender(chartObject,Cancel)
SelectCaseTypeName(chartObject)
Case"ChGridlines"
'Cancelthedrawingofthegridlines.Cancel.Value=True
Case"ChPlotArea"
'Cancelthedrawingoftheplotarea.Cancel.Value=True
EndSelect
EndSub
PrivateSubChartSpace1_AfterRender(drawObject,chartObject)
DimchConstants
SetchConstants=ChartSpace1.Constants
'Checktoseeifthecharthasbeenrendered.IfTypeName(chartObject)="ChChart"Then
![Page 431: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/431.jpg)
'Thenextthreelinesofcodesettheinterior'andborderpropertiesoftheellipse.drawObject.Interior.SetPresetGradient_chConstants.chGradientHorizontal,_chConstants.chGradientVariantStart,_Int((24-1+1)*Rnd+1)drawObject.Border.Weight=1drawObject.Border.Color="black"
'Beginthedrawingobject.drawObject.BeginObject1
'Drawtheellipse.drawObject.DrawEllipsechartObject.PlotArea.Left,chartObject.PlotArea.Bottom,_chartObject.PlotArea.Right,chartObject.PlotArea.Top
drawObject.EndObject
EndIf
EndSub
![Page 432: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/432.jpg)
BeginUndoMethod
Specifiesthebeginningofanundoblock.ThismeansthatallstatementsbetweenthiscallanditscorrespondingEndUndomethodcallwillbeundonebyasinglecalltotheUndomethod.Thismakesitpossibleforyoutocombineentiremacrosintoonestatementthatcanbeeasilyundone.Undoblockscanbenested.
expression.BeginUndo
expressionAnexpressionthatreturnsaChartSpaceorSpreadsheetobject.
![Page 433: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/433.jpg)
ExampleThisexamplecreatesanundoblockcontainingcodethatsetsthenumberformatandfontforcellD10.YoucanundoalloftheformattingbyclickingUndoonSpreadsheet1'stoolbar.
SubUndoBlock()DimrngCurrent'Enableundo.Spreadsheet1.EnableUndo=True'Startanundoblock.Spreadsheet1.BeginUndoSetrngCurrent=Spreadsheet1.Worksheets("sheet1").Range("D10")'Thefollowingthreelinesofcodeapply'variousformattingtocellD10.rngCurrent.NumberFormat="0.###"rngCurrent.Font.Color="Blue"rngCurrent.Font.Name="TimesNewRoman"'Endtheundoblock.Spreadsheet1.EndUndoEndSub
![Page 434: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/434.jpg)
ShowAll
![Page 435: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/435.jpg)
BorderAroundMethod
AddsabordertoarangeandsetstheColor,LineStyle,andWeightpropertiesforthenewborder.
expression.BorderAround(LineStyle,Weight,ColorIndex,Color)
expressionRequired.AnexpressionthatreturnsaRangeobject.
LineStyleOptionalVariant.Thelinestylefortheborder.CanbeaXlLineStyleconstant.
WeightOptionalXlBorderWeight.Theborderweight.
ColorIndexOptionalXlColorIndex.Thebordercolor,asanindexintothecurrentcolorpalette,orasanXlColorIndexconstant.
ColorOptionalVariant.Thebordercolor,asanRGBvalue.
![Page 436: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/436.jpg)
RemarksYoumustspecifyeitherColorIndexorColor,butnotboth.
YoucanspecifyeitherLineStyleorWeight,butnotboth.Ifyoudon'tspecifyeitherargument,thedefaultlinestyleandweightareused.
![Page 437: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/437.jpg)
ExampleThisexampleaddsathickredborderaroundtherangeA1:D4onSheet1.
SubAdd_Border()
DimssConstants
SetssConstants=Spreadsheet1.Constants
Spreadsheet1.Worksheets("Sheet1").Range("A1:D4")_.BorderAround,ssConstants.xlThick,3
EnbSub
![Page 438: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/438.jpg)
CalculateMethod
Calculatestheopenworkbook,aspecificworksheetinaworkbook,oraspecifiedrangeofcellsonaworksheet.
expression.Calculate
expressionAnexpressionthatreturnsaRange,Spreadsheet,orWorksheetobject.
![Page 439: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/439.jpg)
ExampleThisexamplecausestheactiveworksheetonthespreadsheettoberecalculated.
Spreadsheet1.ActiveSheet.Calculate
ThisexamplecausestherangeA1:G5inSheet1toberecalculated.
Spreadsheet1.Worksheets("Sheet1").Range("A1:G5").Calculate
![Page 440: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/440.jpg)
CalculateFullMethod
Forceseveryformulaintheopenworkbooktoberecalculated.
expression.CalculateFull
expressionRequired.AnexpressionthatreturnsaSpreadsheetobject.
![Page 441: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/441.jpg)
ExampleThisexampleforcesafullcalculationofalldatainSpreadsheet1.
Spreadsheet1.CalculateFull
![Page 442: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/442.jpg)
ShowAll
![Page 443: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/443.jpg)
ClearMethod
ClearmethodasitappliestotheChartSpaceobject.
ClearMethodasitappliestotheRangeobject.
![Page 444: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/444.jpg)
ExampleAsitappliestotheChartSpaceobject.
AtisappliestotheRangeobject.
![Page 445: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/445.jpg)
ClearContentsMethod
Deletesalldatafromthespecifiedrange.
expression.ClearContents
expressionAnexpressionthatreturnsaRangeobject.
![Page 446: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/446.jpg)
ExampleThisexampledeletesalldatafromcellsA4:B10ontheactiveworksheetinSpreadhseet1.
Spreadsheet1.ActiveSheet.Range("A4:B10").ClearContents
![Page 447: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/447.jpg)
ClearFormatsMethod
Deletesallformattingfromthespecifiedrange.
expression.ClearFormats
expressionAnexpressionthatreturnsaRangeobject.
![Page 448: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/448.jpg)
ExampleThisexampleclearstheformattingfromallcellsontheactiveworksheet.
Spreadsheet1.ActiveSheet.Cells.ClearFormats
![Page 449: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/449.jpg)
CollapseMethod
Causesthespecifiedsectiontocollapse.
expression.Collapse
expressionAnexpressionthatreturnsaSectionobject.
![Page 450: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/450.jpg)
ShowAll
![Page 451: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/451.jpg)
CopyMethod
CopymethodasitappliestotheSheets,Worksheet,andWorksheetsobjects.
CopymethodasitappliestotheRangeobject.
CopymethodasitappliestothePivotTableobject.
![Page 452: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/452.jpg)
ExampleAsitappliestotheSheets,Worksheet,andSheetsobjects.
AsitappliestotheRangeobject.
AsitappliestothePivotTableobject.
![Page 453: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/453.jpg)
CopyFromRecordsetMethod
CopiesthecontentsofanADOorDAORecordsetobjectontoaworksheet,beginningattheupper-leftcornerofthespecifiedrange.IftheRecordsetobjectcontainsfieldswithOLEobjectsinthem,thismethodfails.
expression.CopyFromRecordset(Data,MaxRows,MaxColumns)
expressionRequired.AnexpressionthatreturnsaRangeobject.
DataRequiredVariant.ThenameoftheRecordsetobjecttocopyintotherange.
MaxRowsOptionalVariant.Themaximumnumberofrecordstocopyontotheworksheet.Ifthisargumentisomitted,alltherecordsintheRecordsetobjectarecopied.
MaxColumnsOptionalVariant.Themaximumnumberoffieldstocopyontotheworksheet.Ifthisargumentisomitted,allthefieldsintheRecordsetobjectarecopied.
![Page 454: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/454.jpg)
RemarksCopyingbeginsatthecurrentrowoftheRecordsetobject.Aftercopyingiscompleted,theEOFpropertyoftheRecordsetobjectisTrue.
Whenthismethodcopiestherecordsettotheworksheet,theresultswillbetruncatedifyoudonotspecifyarangethatislargeenoughtoholdthecontentsoftherecordset.
![Page 455: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/455.jpg)
ExampleThisexamplecopiesarecordsetnamedrstAuthorsintotheactivesheetofSpreadsheet1startingatcellA1.
Spreadsheet1.ActiveSheet.Cells.CopyFromRecordsetrstAuthors
![Page 456: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/456.jpg)
CutMethod
CutsthespecifiedrangeandeithermovesittotheClipboardorpastesitintoaspecifieddestinationrange.
expression.Cut(Destination)
expressionAnexpressionthatreturnsaRangeobject.
DestinationOptionalVariant.Ifyoudonotspecifythisargument,thespecifiedrangeissenttotheClipboard.IfthisargumentisaRangeobject,thesourcerangeismovedtothespecifiedrange.
![Page 457: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/457.jpg)
ExampleThisexamplemovestheformula,data,andformattingfromcellA3tocellG7ontheactiveworksheet.
SubMoveCell()DimshtSourceSetshtSource=Spreadsheet1.ActiveSheet'MovethecontentsofcellA3tocellG7.shtSource.Range("A3").CutshtSource.Range("G7")EndSub
![Page 458: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/458.jpg)
ShowAll
![Page 459: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/459.jpg)
DeleteMethod
DeletemethodasitappliestotheHyperlink,ListRow,Name,PivotHyperlink,Sheets,Worksheet,Worksheets,XmlDataBinding,andXmlMapobjects.
![Page 460: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/460.jpg)
DeletemethodasitappliestotheChAxes,ChCharts,ChSeriesCollection,ElementExtensions,GroupingDefs,GroupLevels,LookupRelationships,PageFields,ParameterValues,RecordsetDefs,SchemaFields,SchemaRelationships,SchemaRowsources,andSublistRelationshipsobjects.
DeletemethodasitappliestotheChDataLabelsCollection,ChErrorBarsCollection,ChSegmentsandChTrendlinesobjects.
DeletemethodasitappliestotheRangeobject.
![Page 461: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/461.jpg)
ExampleAsitappliestotheChDataLabelsCollectioncollection.
![Page 462: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/462.jpg)
DeleteCustomGroupMemberMethod
Deletesamemberfromacustomgroupfield.
expression.DeleteCustomGroupMember(CustomGroupMember)
expressionRequired.AnexpressionthatreturnsaPivotFieldobject.
CustomGroupMemberRequiredVariant.Name,uniquename,orreferencetothemembertodelete.
![Page 463: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/463.jpg)
RemarksThismethodwillreturnarun-timeerrorifthememberreferredtobytheCustomGroupMemberargumentisnotamemberofacustomgroupfield.
![Page 464: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/464.jpg)
DeleteFieldMethod
DeletesacalculatedfieldthatwascreatedbytheAddCalculatedFieldorAddCustomGroupFieldmethodsfromthespecifiedfieldset.
expression.DeleteField(Field)
expressionRequired.AnexpressionthatreturnsaPivotFieldSetobject.
FieldRequiredVariant.Thename,uniquenameorreferencetoacalculatedfieldinthefieldset.
![Page 465: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/465.jpg)
DeleteFieldSetMethod
DeletesafieldsetthatwascreatedusingtheAddFieldSetmethod.ThefieldsetisremovedfromthePivotTableviewandfromthePivotFieldSetscollection.
expression.DeleteFieldSet(FieldSet)
expressionRequired.AnexpressionthatreturnsaPivotViewobject.
FieldSetRequiredVariant.Thenameof,orareferenceto,acustomfieldset.
![Page 466: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/466.jpg)
ExampleThefollowinglineofcodedeletesacustomfieldsetnamed"Variance"fromPivotTable1.
PivotTable1.ActiveView.DeleteFieldSet"Variance"
![Page 467: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/467.jpg)
DeleteRecordMethod
Deletesarecordfromthespecifieddataaccesspage.
expression.DeleteRecord
expressionAnexpressionthatreturnsaDataPageobject.
![Page 468: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/468.jpg)
DeleteTotalMethod
DeletesaPivotTotalobjectfromthePivotTotalscollection.Youcandeleteonlyuser-definedtotals.
expression.DeleteTotal(Total)
expressionAnexpressionthatreturnsaPivotViewobject.
TotalRequiredVariant.Specifiesthenameornumberofthetotal.
![Page 469: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/469.jpg)
ExampleThisexampledeletesatotalnamed"TotalBudget"fromPivotTable1.
SubDelete_Total()DimvwView
SetvwView=PivotTable1.ActiveView
'Deletethetotalnamed"TotalBudget."vwView.DeleteTotalvwView.Totals("TotalBudget")EndSub
![Page 470: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/470.jpg)
DrawEllipseMethod
Drawsanellipseonthespecifiedchart.UsethecurrentsettingsoftheBorderandInteriorpropertiestodeterminethepropertiesofthenewellipse.
expression.DrawEllipse(Left,Top,Right,Bottom)
expressionRequired.AnexpressionthatreturnsaChChartDrawobject.
LeftRequiredLong.Pixelcoordinateoftheleftedgeoftheellipse.
TopRequiredLong.Pixelcoordinateofthetopedgeoftheellipse.
RightRequiredLong.Pixelcoordinateoftherightedgeoftheellipse.
BottomRequiredLong.Pixelcoordinateofthebottomedgeoftheellipse.
![Page 471: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/471.jpg)
ExampleThisexampleusestheBeforeRendereventtocanceldrawingthegridlinesandplotareaofthefirstchartinChartspace1.TheAfterRendereventthenreplacestheplotareawithanellipsethatisdrawnafterthechartisrendered.
PrivateSubChartSpace1_BeforeRender(chartObject,Cancel)
SelectCaseTypeName(chartObject)
Case"ChGridlines"
'Cancelthedrawingofthegridlines.Cancel.Value=True
Case"ChPlotArea"
'Cancelthedrawingoftheplotarea.Cancel.Value=True
EndSelect
EndSub
PrivateSubChartSpace1_AfterRender(drawObject,chartObject)
DimchConstants
SetchConstants=ChartSpace1.Constants
'Checktoseeifthecharthasbeenrendered.IfTypeName(chartObject)="ChChart"Then
![Page 472: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/472.jpg)
'Thenextthreelinesofcodesettheinterior'andborderpropertiesoftheellipse.drawObject.Interior.SetPresetGradient_chConstants.chGradientHorizontal,_chConstants.chGradientVariantStart,_Int((24-1+1)*Rnd+1)drawObject.Border.Weight=1drawObject.Border.Color="black"
'Beginthedrawingobject.drawObject.BeginObject1
'Drawtheellipse.drawObject.DrawEllipsechartObject.Left,chartObject.Bottom,_chartObject.Right,chartObject.Top
drawObject.EndObject
EndIf
EndSub
![Page 473: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/473.jpg)
DrawLineMethod
Drawsalineonthespecifiedchart.UsesthecurrentsettingsoftheLinepropertytodeterminethepropertiesofthenewline.
expression.DrawLine(x0,y0,x1,y1)
expressionRequired.AnexpressionthatreturnsaChChartDrawobject.
x0RequiredLong.StartingpixelcoordinateintheXplane.
y0RequiredLong.StartingpixelcoordinateintheYplane.
x1RequiredLong.EndingpixelcoordinateintheXplane.
y1RequiredLong.EndingpixelcoordinateintheYplane.
![Page 474: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/474.jpg)
ExampleThisexampleillustrateshowyoucanusetheBeforeRenderandAfterRendereventstogethertocreatecustomgridlines.TheBeforeRendereventcancelstherenderingofthegridlinesandtheAfterRendereventdrawscustomgridlines.
SubChartSpace1_BeforeRender(chartObject,Cancel)
'Checktoseeifthenextobjecttoberendered'isagridline.IfTypeName(chartObject)="ChGridlines"Then
'Canceltherenderingofgridlines.Cancel.Value=True
EndIf
EndSub
SubChartSpace1_AfterRender(drawObject,chartObject)
DimchChart1DimplPlotAreaDimlLeftDimlRightDimlHeightDimlTopDimlIncrementDimchConstantsDimiCtr
SetchConstants=ChartSpace1.Constants
![Page 475: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/475.jpg)
'SetavariabletothefirstchartinChartspace1.SetchChart1=ChartSpace1.Charts(0)
'Setavariabletotheplotareaofthechart.SetplPlotArea=chChart1.PlotArea
'Checktoseeiftherenderedobjectisagridline.IfTypeName(chartObject)="ChGridlines"Then
'Thenextfourlinesofcodeusetheextentsof'theplotareatocalculatethedimensionsoftheline.'tobedrawn.lLeft=plPlotArea.LeftlTop=plPlotArea.ToplRight=plPlotArea.RightlHeight=plPlotArea.Bottom-lTop
'Determinetheincrementtousebetweengridlines.'Changethedivisortoadjusttheincrement.lIncrement=lHeight/10
'Thenextthreelinesofcodesetthepropertiesofthe'linetobedrawn.drawObject.Line.DashStyle=chConstants.chLineRoundDotdrawObject.Line.Color="Green"drawObject.Line.Weight=chConstants.owcLineWeightMedium
ForiCtr=1To9
'Drawtheline.drawObject.DrawLinelLeft,lTop+iCtr*lIncrement,_lRight,lTop+iCtr*lIncrement
![Page 476: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/476.jpg)
Next
EndIf
EndSub
![Page 477: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/477.jpg)
DrawPolygonMethod
Drawsapolygononthechart.ThepointsforthepolygonarespecifiedinarrayscontainingtheXandYvaluesthatdescribethesegmentsofthepolygon.UsesthecurrentsettingsoftheBorderandInteriorpropertiestodeterminethepropertiesofthenewpolygon.
expression.DrawPolygon(xValues,yValues)
expressionRequired.AnexpressionthatreturnsaChChartDrawobject.
xValuesRequiredVariant.AnarraycontainingtheXvaluesusedtocalculatethepolygon.
yValuesRequiredVariant.AnarraycontainingtheYvaluesusedtocalculatethepolygon.
![Page 478: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/478.jpg)
ExampleThisexampleusestheBeforeRendereventtocancelrenderingthecharttitleandtheAfterRendereventtoreplacethecharttitlewithapolygon.
PrivateSubChartSpace1_BeforeRender(chartObject,Cancel)
IfTypeName(chartObject)="ChTitle"ThenCancel.Value=TrueEndIf
EndSub
SubChartSpace1_AfterRender(drawObject,chartObject)
DimalXValues(9)DimalYValues(9)DimchConstantsDimiCutoff
iCutoff=20
SetchConstants=ChartSpace1.Constants
IfTypeName(chartObject)="ChTitle"Then
'Setthearraycontainingthexvaluesfor'theline.alXValues(0)=chartObject.Left+iCutoffalXValues(1)=chartObject.Right-iCutoffalXValues(2)=chartObject.RightalXValues(3)=chartObject.Right
![Page 479: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/479.jpg)
alXValues(4)=chartObject.Right-iCutoffalXValues(5)=chartObject.Left+iCutoffalXValues(6)=chartObject.LeftalXValues(7)=chartObject.LeftalXValues(8)=chartObject.Left+iCutoff
'Setthearraycontainingtheyvaluesfor'theline.alYValues(0)=chartObject.TopalYValues(1)=chartObject.TopalYValues(2)=chartObject.Top+iCutoffalYValues(3)=chartObject.Bottom-iCutoffalYValues(4)=chartObject.BottomalYValues(5)=chartObject.BottomalYValues(6)=chartObject.Bottom-iCutoffalYValues(7)=chartObject.Top+iCutoffalYValues(8)=chartObject.Top
'Setthepropertiesforthepolygon.drawObject.Interior.SetTwoColorGradientchConstants.chGradientFromCenter,_chConstants.chGradientVariantStart,"Red","Green"
'Drawthepolygon.drawObject.DrawPolygonalXValues,alYValues
EndIf
EndSub
![Page 480: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/480.jpg)
DrawPolyLineMethod
Drawsalinecontainingmultiplesegments.ThepointsforthelinearespecifiedinarrayscontainingtheXandYvaluesthatdescribethesegmentsoftheline.UsesthecurrentsettingsoftheLinepropertytodeterminethepropertiesofthenewline.
expression.DrawPolyLine(xValues,yValues)
expressionRequired.AnexpressionthatreturnsaChChartDrawobject.
xValuesRequiredVariant.AnarraycontainingtheXvaluesusedtocalculatetheline.
yValuesRequiredVariant.AnarraycontainingtheYvaluesusedtocalculatetheline.
![Page 481: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/481.jpg)
ExampleThisexampleusestheAfterRendereventtodrawacustomborderaroundChartspace1.
SubChartSpace1_AfterRender(drawObject,chartObject)
DimalXValues(9)DimalYValues(9)DimiCutOffDimchConstants
iCutOff=10
SetchConstants=ChartSpace1.Constants
IfTypeName(chartObject)="ChChart"Then
'Setthearraycontainingthexvaluesfor'theline.alXValues(0)=chartObject.Left+iCutOffalXValues(1)=chartObject.Right-iCutOffalXValues(2)=chartObject.RightalXValues(3)=chartObject.RightalXValues(4)=chartObject.Right-iCutOffalXValues(5)=chartObject.Left+iCutOffalXValues(6)=chartObject.LeftalXValues(7)=chartObject.LeftalXValues(8)=chartObject.Left+iCutOff
'Setthearraycontainingtheyvaluesfor'theline.
![Page 482: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/482.jpg)
alYValues(0)=chartObject.TopalYValues(1)=chartObject.TopalYValues(2)=chartObject.Top+iCutOffalYValues(3)=chartObject.Bottom-iCutOffalYValues(4)=chartObject.BottomalYValues(5)=chartObject.BottomalYValues(6)=chartObject.Bottom-iCutOffalYValues(7)=chartObject.Top+iCutOffalYValues(8)=chartObject.Top
'Setthepropertiesfortheline.drawObject.Line.Color="blue"drawObject.Line.Weight=chConstants.owcLineWeightThickdrawObject.Line.DashStyle=chConstants.chLineLongDashDot
'Drawtheline.drawObject.DrawPolyLinealXValues,alYValues
EndIf
EndSub
![Page 483: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/483.jpg)
DrawRectangleMethod
Drawsarectangleonachart.UsesthecurrentsettingsoftheBorderandInteriorpropertiestodeterminethepropertiesofthenewrectangle.
expression.DrawRectangle(Left,Top,Right,Bottom)
expressionRequired.AnexpressionthatreturnsaChChartDrawobject.
LeftRequiredLong.Pixelcoordinateoftheleftedgeoftherectangle.
TopRequiredLong.Pixelcoordinateofthetopedgeoftherectangle.
RightRequiredLong.Pixelcoordinateoftherightedgeoftherectangle.
BottomRequiredLong.Pixelcoordinateofthebottomedgeoftherectangle.
![Page 484: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/484.jpg)
ExampleThisexampleusestheAfterRendereventtodrawrectanglesasasubstituteforthelegendentriesinthefirstchartofChartspace1.
SubChartSpace1_AfterRender(drawObject,chartObject)
DimchConstants
SetchConstants=ChartSpace1.Constants
IfTypeName(chartObject)="ChLegendEntry"Then
'Settheinterioroftherectangletoapresettexture.'YoucouldsubstituteaURLtoacustomgraphic'forthetexture.drawObject.Interior.SetTexturedchConstants.chTextureSand
'Begindrawingtherectangle.drawObject.BeginObject1
'Drawtherectangle.drawObject.DrawRectanglechartObject.Left,chartObject.Top,_chartObject.Right,chartObject.Bottom
drawObject.EndObject
EndIf
EndSub
![Page 485: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/485.jpg)
DrawTextMethod
Drawsatextstringonachart.
expression.DrawText(bstrText,Left,Top)
expressionRequired.AnexpressionthatreturnsaChChartDrawobject.
bstrTextRequiredString.Thetexttodrawonthechart.
LeftRequiredLong.Pixelcoordinateoftheleftedgeofthetext.
TopRequiredLong.Pixelcoordinateofthetopedgeofthetext.
![Page 486: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/486.jpg)
ExampleThisexampleaddsatextstringtotheupper-leftcorneroftheplotareaeachtimethatthechartisre-drawn.
SubChartSpace1_AfterRender(drawObject,chartObject)
DimchChart1
SetchChart1=ChartSpace1.Charts(0)'Afterthelegendhasbeenrendered,thenaddthetext'tothechart.IfTypeName(chartObject)="ChLegend"ThendrawObject.DrawText"2000Sales",chChart1.PlotArea.Left+5,_chChart1.PlotArea.TopEndIf
EndSub
![Page 487: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/487.jpg)
ShowAll
![Page 488: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/488.jpg)
DropZonesMethod
ReturnsaChDropZoneobject.Usethepropertiesofthereturnedobjecttoformatthedropzone.
expression.DropZones(dz)
expressionRequired.AnexpressionthatreturnsaChartspaceobject.
dzRequiredChartDropZonesEnum.Representsthedropzonethatyouwanttoformat.
![Page 489: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/489.jpg)
ExampleThisexampleformatsthebuttonandthewatermarkoftheseriesdropzoneinChartspace1.
SubSetupDropZone()
DimdzSeriesDropZoneDimchConstants
SetchConstants=Chartspace1.Constants
'SetavariabletotheseriesdropzoneinChartspace1.SetdzSeriesDropZone=ChartSpace1.DropZones(chConstants.chDropZoneSeries)
'Thenextthreelinesofcodeformatthebuttonofthedropzone.dzSeriesDropZone.ButtonBorder.Weight=chConstants.owcLineWeightMediumdzSeriesDropZone.ButtonInterior.SetSolid"Red"dzSeriesDropZone.ButtonFont.Size=14
'Thenextthreelinesofcodeformatthewatermarkofthedropzone.dzSeriesDropZone.WatermarkBorder.Color="Red"dzSeriesDropZone.WatermarkFont.Color="Red"dzSeriesDropZone.WatermarkInterior.SetSolid"Green"
EndSub
![Page 490: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/490.jpg)
DuplicateFormatMethod
Copiestheformattingandtypeofthespecifiedcharttootherchartsintheworkspacethatareboundtothesamedatasource.Thismethodcanonlybeusedwhenthechartcontrolisboundtoarelationaldatasourcelist.
expression.DuplicateFormat
expressionRequired.AnexpressionthatreturnsaChChartobject.
![Page 491: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/491.jpg)
RemarksTheHasMultipleChartspropertyofthechartcontrolmustbesettoTruebeforeusingthismethod.
![Page 492: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/492.jpg)
ExampleThisexamplecopiestheformattingofthefirstchartinChartspace1toallotherchartsinChartspace1thatareboundtothesamePivotTablelist.
Chartspace1.Charts(0).DuplicateFormat
![Page 493: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/493.jpg)
EndEditMethod
Movestheactivecelloutofeditmode.
expression.EndEdit(Accept)
expressionRequired.AnexpressionthatreturnsaPivotTableobject.
AcceptOptionalBoolean.Specifieswhetherthecurrentvalueisaccepted.SettingthisargumenttoFalsediscardsanychangestothedetailcellandthepreviousvalueisrestored.ThedefaultvalueisTrue.
![Page 494: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/494.jpg)
EndObjectMethod
EndsthedrawingsequenceforthespecifiedChChartDrawobject.
expression.EndObject
expressionRequired.AnexpressionthatreturnsaChChartDrawobject.
![Page 495: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/495.jpg)
ExampleThisexampleusestheBeforeRendereventtocanceldrawingthegridlinesandplotareaofthefirstchartinChartspace1.TheAfterRendereventthenreplacestheplotareawithanellipsethatisdrawnafterthechartisrendered.
PrivateSubChartSpace1_BeforeRender(chartObject,Cancel)
SelectCaseTypeName(chartObject)
Case"ChGridlines"
'Cancelthedrawingofthegridlines.Cancel.Value=True
Case"ChPlotArea"
'Cancelthedrawingoftheplotarea.Cancel.Value=True
EndSelect
EndSub
PrivateSubChartSpace1_AfterRender(drawObject,chartObject)
DimchConstants
SetchConstants=ChartSpace1.Constants
'Checktoseeifthecharthasbeenrendered.IfTypeName(chartObject)="ChChart"Then
![Page 496: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/496.jpg)
'Thenextthreelinesofcodesettheinterior'andborderpropertiesoftheellipse.drawObject.Interior.SetPresetGradient_chConstants.chGradientHorizontal,_chConstants.chGradientVariantStart,_Int((24-1+1)*Rnd+1)drawObject.Border.Weight=1drawObject.Border.Color="black"
'Beginthedrawingobject.drawObject.BeginObject1
'Drawtheellipse.drawObject.DrawEllipsechartObject.Left,chartObject.Bottom,_chartObject.Right,chartObject.Top
drawObject.EndObject
EndIf
EndSub
![Page 497: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/497.jpg)
EndUndoMethod
Specifiestheendofanundoblock.ThismeansthatallstatementsbetweenthiscallanditscorrespondingBeginUndomethodcallwillbeundonebyasinglecalltotheUndomethod.Thismakesitpossibleforyoutocombineentiremacrosintoonestatementthatcanbeeasilyundone.Undoblockscanbenested.
expression.EndUndo
expressionAnexpressionthatreturnsaChartSpaceorSpreadsheetobject.
![Page 498: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/498.jpg)
ExampleThisexamplecreatesanundoblockcontainingcodethatsetsthenumberformatandfontforcellD10.YoucanundoalloftheformattingbyclickingUndoonSpreadsheet1'stoolbar.
SubUndoBlock()DimrngCurrent'Enableundo.Spreadsheet1.EnableUndo=True'Startanundoblock.Spreadsheet1.BeginUndoSetrngCurrent=Spreadsheet1.Worksheets("sheet1").Range("D10")'Thefollowingthreelinesofcodeapply'variousformattingtocellD10.rngCurrent.NumberFormat="0.###"rngCurrent.Font.Color="Blue"rngCurrent.Font.Name="TimesNewRoman"'Endtheundoblock.Spreadsheet1.EndUndoEndSub
![Page 499: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/499.jpg)
EuroConvertMethod
YoucanusetheEuroConvertmethodtoconvertanumbertotheeuroorfromtheeurotoaparticipatingcurrency.Youcanalsouseittoconvertanumberfromoneparticipatingcurrencytoanotherbyusingtheeuroasanintermediary(triangulation).TheEuroConvertmethodusesfixedconversionratesestablishedbytheEuropeanCommission.ReturnsaDoublevalue.
expression.euroConvert(Number,SourceCurrency,TargetCurrency,FullPrecision,TriangulationPrecision)
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
NumberRequiredDouble.Thenumberyouwanttoconvert.
SourceCurrencyRequiredString.Astringexpression,orreferencetoafieldcontainingthestring,correspondingtotheInternationalStandardsOrganization(ISO)acronymforthecurrencyyouwanttoconvert.CanbeoneoftheISOcodeslistedinthefollowingtable.
CurrencyISOCode
CalculationPrecision
DisplayPrecision
Belgianfranc BEF 0 0Luxembourgfranc LUF 0 0Deutschemark DEM 2 2Spanishpeseta ESP 0 0Frenchfranc FRF 2 2Irishpunt IEP 2 2Italianlira ITL 0 0Netherlandsguilder NLG 2 2Austrianschilling ATS 2 2Portugueseescudo PTE 1 2finishMarkka FIM 2 2euro EUR 2 2Intheprecedingtable,thecalculation
![Page 500: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/500.jpg)
precisiondetermineswhatcurrencyunittoroundtheresulttobasedontheconversioncurrency.Forexample,whenconvertingtoDeutschemarks,thecalculationprecisionis2,andtheresultisroundedtothenearestpfennig,100pfennigstoamark.Thedisplayprecisiondetermineshowmanydecimalplacesappearinthefieldcontainingtheresult.
LaterversionsoftheEuroConvertmethodmaysupportadditionalcurrencies.
Currency ISOCodeDanishKrone DKKDrachma GRDSwedishKrona SEKPoundSterling GBP
TargetCurrencyRequiredString.Athree-letterstringcorrespondingtotheISOcodeofthecurrencytowhichyouwanttoconvertthenumber.SeetheprevioustablefortheISOcodes.ForalistofISOcodes,seetheSourceCurrencyargumentdescription.
FullPrecisionOptionalVariant.Alogicalvalue(TrueorFalse),oranexpressionthatevaluatestoavalueofTrueorFalse,thatspecifieshowtodisplaytheresult.
Use IfyouwanttoFalse Displaytheresultwiththecurrency-specificroundingrules(see
thetableintheSourceCurrencyargumentdescription).Thecalculationprecisionvalueisusedtocalculatetheresultandthedisplayprecisionvaluetodisplaytheresult.FalseisthedefaultiftheFullPrecisionargumentisomitted.
True Displaytheresultwithallsignificantdigitsresultingfromthecalculation.
TriangulationPrecisionOptionalVariant.Avaluegreaterthanorequalto3thatspecifiesthenumberofsignificantdigitsinthecalculation
![Page 501: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/501.jpg)
precisionusedfortheintermediateeurovaluewhenconvertingbetweentwonationalcurrencies.
![Page 502: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/502.jpg)
RemarksAnytrailingzerosaretruncatedandinvalidparametersreturn#Error.
IfthesourceISOcodeisthesameasthetargetISOcode,theoriginalvalueofthenumberisactive.
Thismethoddoesnotapplyaformat.
TheEuroConvertmethodusesthecurrentratesestablishedbytheEuropeanCommission.Iftherateschange,Microsoftwillupdatethemethod.Togetfullinformationabouttherulesandtheratescurrentlyineffect,seetheEuropeanCommissionpublicationsabouttheeuro.
![Page 503: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/503.jpg)
ExampleThisexampleconvertsthevalueoftheUnitPricefieldfromFrenchfrancstoeuros.
DubConvertToEuros()
DimdblSourceNumDimdblConvertedNum
'SetavariabletotheUnitPricefield.dblSourceNum=Document.All("unitprice").Value'ConverttheUnitPricefromFrenchfrancstoeuros.dblConvertedNum=MSODSC.EuroConvert(dblsourcenum,"FRF","EUR",False,3)'PlacetheconvertedvalueintheEuroValuefield.Document.All("EuroValue").Value=dblConvertedNumEndSub
![Page 504: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/504.jpg)
EvaluateMethod
Evaluatesanexpressionthatisintheformoftextandreturnstheresult.Theexpressioncanincludeanycombinationoffunctions,keywords,orothersyntaxthattheSpreadsheetComponentcanresolve.
expression.Evaluate(Expression)
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
ExpressionRequiredVariant.Theexpressiontoevaluate.
![Page 505: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/505.jpg)
RemarksThefollowingtypesofnamesinMicrosoftExcelcanbeusedwiththismethod:
A1-stylereferences.YoucanuseanyreferencetoasinglecellinA1-stylenotation.Allreferencesareconsideredtobeabsolutereferences.
Ranges.Youcanusetherange,intersect,andunionoperators(colon,space,andcomma,respectively)withreferences.
Definednames.Youcanspecifyanynameinthelanguageofthemacro.
![Page 506: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/506.jpg)
ExampleThisexampleusesthetheEvaluatemethodtocalculatethecotangentofanangle.
FunctionCalcCotangent(sngAngleInDegrees)
DimstrExpression
'Puttogethertheexpressiontocalculatethecotangent'oftheangle.strExpression="1/TAN("&sngAngleInDegrees&"*PI()/180)"
'Evaluatethestringandreturntheresult.CalcCotangent=Spreadsheet1.ActiveSheet.Evaluate(strExpression)
EndFunction
![Page 507: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/507.jpg)
ShowAll
![Page 508: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/508.jpg)
ExecuteMethod
ExecutemethodasitappliestotheDataSourceControlobject.
ExecutemethodasitappliestotheOCCommandobject.
![Page 509: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/509.jpg)
ExpandMethod
Causesthespecifiedsectiontoexpand.
expression.Expand
expressionAnexpressionthatreturnsaSectionobject.
![Page 510: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/510.jpg)
ShowAll
![Page 511: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/511.jpg)
ExportMethod
ExportmethodasitappliestotheandPivotTableobject.
ExportmethodasitappliestotheSpreadsheetobject.
![Page 512: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/512.jpg)
ExampleAsitappliestotheSpreadsheetobject.
![Page 513: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/513.jpg)
ExportMetaDataMethod
UsethismethodtoreturnaVariant(String)thatcontainsthe<pagingInfo>tagfromthedataretrievalservicesqueryresponsefromthemostrecentbindingrefreshoperation.
expression.ExportMetaData(ShowDialogs)
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
ShowDialogsOptionalBoolean.SpecifieswhetheradialogboxisdisplayediftheExportMetaDatamethodencountersanerrorthatisreturnedbytheSpreadsheetcomponentitself.WhenShowDialogsissettoTrue,adialogboxisdisplayediftheExportMetaDatamethodencountersanerrorreturnedbytheSpreadsheetcomponent.WhenShowDialogsissettoFalse,dialogboxesforSpreadsheetcomponenterrorsarenotdisplayed.ThedefaultisFalse.
NoteTheShowDialogsargumentdoesnotcontrolwhetheradialogboxwillbedisplayedforerrorsexternaltotheSpreadsheetcomponent,suchaserrorsreturnedbyscriptingcomponents.TopreventadialogboxfromdisplayingforerrorsexternaltotheSpreadsheetcomponent,youmusttrapthoseerrorsinyourscript.
![Page 514: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/514.jpg)
Remarks
The<pagingInfo>tagwillnotalwaysbepresentinthequeryresponse.Whenitisnotpresent,theExportMetaDatamethodwillreturnanemptyString.
![Page 515: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/515.jpg)
ExportPictureMethod
SavesthespecifiedchartworkspaceorPivotTablelistasagraphicsfile.
expression.ExportPicture(FileName,FilterName,Width,Height)
expressionAnexpressionthatreturnsaChartSpaceorPivotTableobject.
FileNameOptionalString.Specifiesthenameofthesavedfile.Ifyoudonotspecifythisargument,thedefaultfilenameis“Chart.gif”forachartworkspaceor“Pivot.gif”foraPivotTablelist.
FilterNameOptionalString.Specifiesthenameofthegraphicsfilterthatisused.SupportedfilternamesareGIF,JPG,andPNG.ThedefaultisGIF.
WidthOptionalLong.Specifiesthewidthofthegraphic,inpixels.Youmustspecifythisargumentforserver-sidecharts.
HeightOptionalLong.Specifiestheheightofthegraphic,inpixels.Youmustspecifythisargumentforserver-sidecharts.
![Page 516: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/516.jpg)
ExampleThisexamplesavesthechartworkspaceasagraphicsfile.
ChartSpace1.ExportPicture"sales.gif","gif",320,240
![Page 517: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/517.jpg)
ShowAll
![Page 518: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/518.jpg)
ExportXMLMethod
AsitappliestotheDataSourceControlobject.
![Page 519: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/519.jpg)
AsitappliestotheXmlMapobject.
![Page 520: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/520.jpg)
ExampleAsitappliestotheDataSourceControlobject.
![Page 521: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/521.jpg)
FillDownMethod
Fillsdownfromthetopcellorcellsinthespecifiedrangetothebottomoftherange.Thecontentsandformattingofthecellorcellsinthetoprowarecopiedintotherestoftherowsintherange.
expression.FillDown
expressionRequired.AnexpressionthatreturnsaRangeobject.
![Page 522: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/522.jpg)
ExampleThisexamplefillstherangeA1:A10ontheactiveworksheet,basedonthecontentsofcellA1.
Spreadsheet1.ActiveSheet.Range("A1:A10").FillDown
![Page 523: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/523.jpg)
FillRightMethod
Fillsrightfromtheleftmostcellorcellsinthespecifiedrange.Thecontentsandformattingofthecellorcellsintheleftmostcolumnarecopiedintotherestofthecolumnsintherange.
expression.FillRight
expressionRequired.AnexpressionthatreturnsaRangeobject.
![Page 524: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/524.jpg)
ExampleThisexamplefillstherangeA1:M1ontheactiveworksheet,basedonthecontentsofcellA1.
Spreadsheet1.ActiveSheet.Range("A1:M1").FillRight
![Page 525: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/525.jpg)
ShowAll
![Page 526: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/526.jpg)
FindMethod
FindsspecificinformationinagivenrangeandreturnsaRangeobjectthatrepresentsthefirstcellwherethatinformationisfound.ReturnsNothingifnomatchisfound.Doesnotaffecteithertheselectionortheactivecell.
expression.Find(What,After,LookIn,LookAt,SearchOrder,SearchDirection,MatchCase,MatchByte)
expressionAnexpressionthatreturnsaRangeobject.
WhatRequiredVariant.Thedatatobesearchedfor.
AfterOptionalVariant.Specifiesasinglecellafterwhichthesearchbegins.Thiscorrespondstothepositionoftheactivecellwhenasearchisdonefromtheuserinterface.Rememberthatthesearchbeginsafterthiscell;thespecifiedcellisn’tsearcheduntilthemethodwrapsbackaroundtothiscell.Ifyoudon’tspecifythisargument,thesearchstartsafterthecellintheupper-leftcorneroftherange
LookInOptionalXlFindLookIn.Specifieswhethertosearchformulasorthedisplayedvalue.
LookAtOptionalXlLookAt.SetthisargumenttoxlWholetoforcetheentirecontentsofthecelltomatchthecontentsoftheWhatargument.
SearchOrderOptionalXlSearchOrder.Specifieswhethertosearchbycolumnsorrows.
SearchDirectionOptionalXlSearchDirection.Specifiesthesearchdirection.
MatchCaseOptionalBoolean.Truetomakethesearchcasesensitive.ThedefaultvalueisFalse.
MatchByteOptionalVariant.Usedonlyifyou’veselectedorinstalleddouble-bytelanguagesupport.Truetohavedouble-bytecharactersmatchonlydouble-bytecharacters.Falsetohavedouble-bytecharactersmatchtheirsingle-byteequivalents.
![Page 527: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/527.jpg)
ExampleThisexamplefindsalloccurrencesof"Mike"intherangeA1:F10andmakesthosecellsbold.
SubFind_Mike()DimssConstantsDimrngFindRangeDimrngFoundCellDimrngFirstFound
SetssConstants=Spreadsheet1.Constants
'Setavariabletotherangetosearch.SetrngFindRange=Spreadsheet1.Sheets("Sheet1").Range("A1:F10")
'FindthefirstoccurrenceofMike.SetrngFoundCell=rngFindRange.Find("Mike",rngFindRange.Cells(1,1),_ssConstants.xlValues,ssConstants.xlPart)
'IfMikewasfound...IfNotrngFoundCellIsNothingThen
'Setavariabletothefirstfoundinstance.SetrngFirstFound=rngFoundCell
Do'Setthefonttobold.rngFoundCell.Font.Bold=True
'FindthenextoccurrenceofMike.SetrngFoundCell=rngFindRange.FindNext(rngFoundCell)
![Page 528: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/528.jpg)
'LoopuntilyoureturntothefirstoccurrenceofMike.LoopUntilrngFoundCell.Address=rngFirstFound.AddressEndIfEndSub
![Page 529: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/529.jpg)
FindNextMethod
ContinuesasearchthatwasbegunwiththeFindmethod.FindsthenextcellthatmatchesthosesameconditionsandreturnsaRangeobjectthatrepresentsthatcell.Doesn’taffecttheselectionortheactivecell.
expression.FindNext(After)
expressionRequired.AnexpressionthatreturnsaRangeobject.
AfterOptionalVariant.Thecellafterwhichyouwanttosearch.Thiscorrespondstothepositionoftheactivecellintheuserinterface.NotethatAftermustbeasinglecellintherange.Rememberthatthesearchbeginsaftertheactivecell;theactivecellitselfisn’tsearcheduntiltheFindNextmethodwrapsbackaroundtotheactivecell.Ifthisargumentisn’tspecified,thesearchstartsafterthecellintheupper-leftcorneroftherange.
![Page 530: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/530.jpg)
ExampleThisexamplefindsalloccurrencesof"Mike"inSheet1andmakesthosecellsbold.
SubFindMike()
DimssConstantsDimrngFindRangeDimrngFoundCellDimrngFirstFound
SetssConstants=Spreadsheet1.Constants
'Setavariabletotherangetosearch.SetrngFindRange=Spreadsheet1.Sheets("Sheet1").UsedRange
'FindthefirstocurenceofMike.SetrngFoundCell=rngFindRange.Find("Mike",rngFindRange.Cells(1,1),_ssConstants.xlValues,ssConstants.xlPart)
'IfMikewasfound...IfNotrngFoundCellIsNothingThen
'Setavariabletothefirstfoundinstance.SetrngFirstFound=rngFoundCell
Do'Setthefonttobold.rngFoundCell.Font.Bold=True
'FindthenextoccurrenceofMike.
![Page 531: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/531.jpg)
SetrngFoundCell=rngFindRange.FindNext(rngFoundCell)
'LoopuntilyoureturntothefirstoccurrenceofMike.LoopUntilrngFoundCell.Address=rngFirstFound.Address
EndIf
EndSub
![Page 532: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/532.jpg)
FindPreviousMethod
ContinuesasearchthatwasbegunwiththeFindmethod.FindsthepreviouscellthatmatchesthosesameconditionsandreturnsaRangeobjectthatrepresentsthatcell.Doesn’taffecttheselectionortheactivecell.
expression.FindPrevious(After)
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
AfterOptionalVariant.Thecellbeforewhichyouwanttosearch.Thiscorrespondstothepositionoftheactivecellintheuserinterface.NotethatAftermustbeasinglecellintherange.Rememberthatthesearchbeginsbeforetheactivecell;theactivecellitselfisn’tsearcheduntiltheFindPreviousmethodwrapsbackaroundtothiscell.Ifthisargumentisn’tspecified,thesearchstartsbeforetheupper-leftcellintherange.
![Page 533: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/533.jpg)
ExampleThisexampleshowshowtheFindPreviousmethodisusedwiththeFindandFindNextmethods.Beforerunningthisexample,makesurethatSheet1containsatleasttwooccurrencesoftheword“Redmond”incolumnB.
SubFind_Methods()
DimrngFoundCellDimrngFindRange
'Setavariabletotherangetosearch.SetrngFindRange=Spreadsheet1.ActiveSheet.Columns("B")
'FindthefirstoccurenceofRedmondincolumnB.SetrngFoundCell=rngFindRange.Find("Redmond")
'DisplaythelocationofthefirstoccurenceofRedmond.MsgBox"Thefirstoccurrenceisincell"&rngFoundCell.Address
'FindthenextoccurenceofRedmondincolumnB.SetrngFoundCell=rngFindRange.FindNext(after:=rngFoundCell)
'DisplaythelocationofthenextoccurenceofRedmond.MsgBox"Thenextoccurrenceisincell"&rngFoundCell.Address
'FindthepreviousoccurenceofRedmondincolumnB.SetrngFoundCell=rngFindRange.FindPrevious(after:=rngFoundCell)
'DisplaythelocationofthepreviousoccurenceofRedmond.MsgBox"Thepreviousoccurrenceisincell"&rngFoundCell.Address
![Page 534: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/534.jpg)
EndSub
![Page 535: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/535.jpg)
FireParametersOutMethod
UsethisthismethodtotriggertheParametersOutReadyevent.ReturnsNothing.
expression.FireParametersOut(InterfaceName,ParamArray)
expressionRequired.AnexpressionthatreturnsaSpreadsheetobject.
InterfaceNameRequired.NameofaParametersOutProviderinterface,asspecifiedinthesolutionspecificationfile.
ParamArrayOptional.Onedimensionalarrayofstringsinwhicheachstringisthevalueofaparameter.Ifaparameterisnotspecified,thevaluein/ParametersOutProvider/SendParameters/Parameter/DefaultValuewillbeused.Ifbotharemissing,anerrorisreturned.
![Page 536: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/536.jpg)
Remarks
Notethatthismethoddoesn'tapplyunlesstheSpreadsheetcomponentisrunninginthecontextofaSpreadsheetWebPartonaWebPartPageonaSharePointsite.
TheSpreadsheetWebPartcanimplementtheIParametersOutProviderinterface.TheParametersOutReadyeventistriggeredwhenaseparateWebPartthatimplementstheIParametersOutProviderinterfaceinvokesitsFireParametersOutmethod.TheParametersOutReadyeventpassesasetofdeveloper-definedparameterstoanotherWebPartthatimplementstheIParametersOutConsumerinterface.
Formoreinformationontheschemaofasolutionspecificationfile,searchtheMicrosoftDeveloperNetwork(MSDN)Websitefor"solutionspecificationfile."Forgeneralinformationonthesolutionspecificationfileandsomeexamples,searchMicrosoftOfficeExcel2003helpfor"spreadsheetwebpart."
![Page 537: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/537.jpg)
FlipHorizontalMethod
Flipsalloftheseriesinthespecifiedcharthorizontally.
expression.FlipHorizontal
expressionAnexpressionthatreturnsaChPlotAreaobject.
![Page 538: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/538.jpg)
ExampleThisexampleflipsalloftheseriesinthespecifiedcharthorizontally.
ChartSpace1.Charts(0).PlotArea.FlipHorizontal
![Page 539: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/539.jpg)
FlipVerticalMethod
Flipsalloftheseriesinthespecifiedchartvertically.
expression.FlipVertical
expressionAnexpressionthatreturnsaChPlotAreaobject.
![Page 540: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/540.jpg)
ExampleThisexampleflipsalloftheseriesinthespecifiedchartvertically.
ChartSpace1.Charts(0).PlotArea.FlipVertical
![Page 541: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/541.jpg)
ShowAll
![Page 542: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/542.jpg)
FollowMethod
FollowmethodasitappliestotheHyperlinkobject.
FollowmethodasitappliestothePivotHyperlinkobject.
![Page 543: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/543.jpg)
ExampleThisexampleresolvesthehyperlinkincellB15ontheactiveworksheet,downloadsthetargetdocument,andthendisplaysthedocument.
Spreadsheet1.ActiveSheet.Range("b15").Hyperlink.Follow
![Page 544: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/544.jpg)
GetContainingSectionMethod
ReturnsthecontainingsectionforthespecifiedHTMLelement.
expression.GetContainingSection(Element)
expressionAnexpressionthatreturnsaDataSourceControlobject.
ElementRequiredObject.RepresentsthespecifiedHTMLelement.
![Page 545: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/545.jpg)
ShowAll
![Page 546: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/546.jpg)
GetDataPointVisibleMethod
Returnstheindexofthedatapointthatisvisibleinthescrollview.Long.
expression.GetDataPointVisible(datapoint)
expressionRequired.AnexpressionthatreturnsaChSeriesobject.
datapointRequiredChartDataPointEnum.
![Page 547: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/547.jpg)
Remarks
Adatapointisconsideredvisibleonlyiftheassociatedcategoryiswithinthescrollview.Thismethodisvalidonlyforbarandcolumncharts.Forothercharttypes,thevaluereturnedisundefined.
![Page 548: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/548.jpg)
ExampleThefollowingexampledemonstrateshowtogettheindexofthedatapointthatisvisibleinthescrollview.
DimobjSeriesDimchChartDimlngPointFirstDimlngPointLast
SetchChart=ChartSpace.Constants
'Savethelowestandhighestvisibledatapointindexvaluestovariables.lngPointFirst=_objSeries.GetDataPointVisible(chChart.chDataPointFirst)lngPointLast=_objSeries.GetDataPointVisible(chChart.chDataPointLast)
![Page 549: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/549.jpg)
GetPictureMethod
Returnsapictureofachartfromabinarydatastream.
expression.GetPicture(FilterName,Width,Height)
expressionRequired.AnexpressionthatreturnsaChartSpaceobject.
FilterNameOptionalString.Thenameofthegraphicsfiltertouse.Thedefaultvalueis"GIF".
WidthOptionalLong.Thewidthofthechartinpixels.
HeightOptionalLong.Theheightofthechartinpixels.
![Page 550: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/550.jpg)
RemarksYoucanusetheBinaryWritemethodtowritethepicturereturnedbythismethodtothecurrentHTTPsession.
![Page 551: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/551.jpg)
ExampleThisexampleusesanASPscripttocreateachartbasedondatainaSQLServerdatabase.Oncethecharthasbeencreated,anpictureofthechartisdisplayedinthebrowserwindow.
<%DimPictTypeDimNewChartDimchConstants
SetNewChart=CreateObject("OWC11.ChartSpace")
Response.Expires=0Response.Buffer=TrueResponse.Clear
PictType="jpg"Response.ContentType="image/"&PictType
SetchConstants=NewChart.Constants
NewChart.ConnectionString="Provider=SQLOLEDB.1;PersistSecurityInfo=TRUE;"&_"IntegratedSecurity=SSPI;InitialCatalog=Northwind;"&_"DataSource=servername;"NewChart.DataMember="OrderDetails"
NewChart.SetDatachConstants.chDimCategories,chConstants.chDataBound,"ProductID"NewChart.SetDatachConstants.chDimValues,chConstants.chDataBound,"Quantity"
NewChart.Charts(0).Type=chConstants.chChartTypeColumn3DNewChart.Charts(0).HasTitle=True
![Page 552: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/552.jpg)
NewChart.Charts(0).Title.Caption="Server-RenderedChart"
Response.BinaryWriteNewChart.GetPicture(PictType,500,400)%>
![Page 553: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/553.jpg)
ShowAll
![Page 554: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/554.jpg)
GetValueMethod
Returnsadatavalueforthespecifiedpointinacustomdatadimension.
expression.GetValue(Dimension,scaled)
expressionAnexpressionthatreturnsaChPointobject.
DimensionRequiredChartDimensionsEnum.Thedimensionfromwhichyouareretrievingthevalue.
ScaledOptionalVariant.Specifieswhethertoreturntheactualvalueofthepoint,oritspercentageasitrelatestotheotherrelatedpoints.SetthisargumenttoTruetoreturnthepercentage.ThisargumentisrelevantonlywhenyouareusingaPie,Doughnut,orStackedColumnchart.
![Page 555: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/555.jpg)
RemarksAlternatively,youcanspecifyaChartErrorBarCustomValuesEnumconstantfortheDimensionargumenttoreturnthevalueofanerrorbar.
![Page 556: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/556.jpg)
GroupMethod
GroupsthespecidfiedserieswiththeseriesspecifiedintheSeriesargument.
expression.Group(Series)
expressionRequired.AnexpressionthatreturnsaChSeriesobject.
SeriesRequiredChSeriesobject.Theseriestogroupthespecifiedserieswith.
![Page 557: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/557.jpg)
HideDetailsMethod
Hidesthedetailscellsforthespecifiedobject.IfthespecifiedobjectisaPivotDataobject,alldetailcellsarehidden.IfthespecifiedobjectisaPivotRowMemberobject,thenalldetailscellsinthatrowarehidden.IfthespecifiedobjectisaPivotColumnMemberobject,thenalldetailscellsinthatcolumnarehidden.
expression.HideDetails
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 558: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/558.jpg)
ExampleThisexamplehidesallofthedetailcellsinPivotTable1.
PivotTable1.ActiveData.HideDetails
![Page 559: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/559.jpg)
ImportXmlMethod
Whenthismethodiscalled,thespecifiedSpreadsheetcomponentmapisupdatedwithanXMLdatastream.ReturnsNothing.
expression.ImportXml(XMLData,ShowDialogs,UseIDXPath)
expressionAnexpressionthatreturnsanXmlMapobject.
XMLDataRequiredVariant.AStringorIStreamobjectthatcontainstheXMLdatatobeimported.
ShowDialogsOptionalBoolean.SpecifieswhetheradialogboxisdisplayediftheImportXmlmethodencountersanerrorthatisreturnedbytheSpreadsheetcomponentitself.WhenShowDialogsissettoTrue,adialogboxisdisplayediftheImportXmlmethodencountersanerrorreturnedbytheSpreadsheetcomponent.WhenShowDialogsissettoFalse,dialogboxesforSpreadsheetcomponenterrorsarenotdisplayed.ThedefaultisFalse.
UseIDXPathOptionalBoolean.SpecifieshowtoimportXMLdataintoaSpreadsheetWebPartthatimplementsanIRowConsumerconnectioninterfaceintheRowConsumerelementofitssolutionspecificationfile.WhensettoFalse,theSpreadsheetWebPartimportstheXMLdataaccordingtotheXPathstatementspecifiedintheXPathelementwithintheMapelementintheXMLSpreadsheetfileassociatedwiththeWebPart.WhensettoTrue,theSpreadsheetWebPartimportstheXMLdatausingaroot/rowschema(asshownbelow),andmapstherowelementstotheFieldelementswithintheMapelementoftheXMLSpreadsheetfileassociatedwiththeWebPart.ThedefaultisFalse.
Root/RowSchema
<Root><Row><Field1>Field1Value</Field1><Field2>Field2Value</Field2></Row></Root>
![Page 560: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/560.jpg)
TheSpreadsheetWebPartwillattempttomatcheachfieldtagname(suchasField1andField2intheschemaexampleabove)totheIDattributeofaFieldelementwithintheMapelementofanXMLSpreadsheetfile.Forexample,thefollowingXMLfragmentfromanXMLSpreadsheetfileshowsaFieldelementwithanIDattributevalueof"Field1".
<Mapx2:ID="Products_Map"x2:SchemaID="Schema1"x2:RootElement="Products"><Entryx2:Type="table"x2:ID="2"x2:ShowTotals="false"x2:NoInserts="true"><Range>Products!R2C1:R4C8</Range><HeaderRange>R1C1</HeaderRange><x:FilterOn>True</x:FilterOn><XPath>/Products/Products_Row</XPath><Fieldx2:ID="Field1"><Range>RC</Range><XPath>ProductID</XPath><XSDType>int</XSDType></Field>...
NoteTheShowDialogsargumentdoesnotcontrolwhetheradialogboxwillbedisplayedforerrorsexternaltotheSpreadsheetcomponent,suchaserrorsreturnedbyscriptingcomponents.TopreventadialogboxfromdisplayingforerrorsexternaltotheSpreadsheetcomponent,youmusttrapthoseerrorsinyourscript.
![Page 561: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/561.jpg)
Remarks
UsetheImportXmlmethodtoimportthecontentsofanXMLdatafileintocellsorintoanXMLlistmappedtoaspecificschemamap.IfthecontentsoftheXMLdatafiletobeimporteddonotmatchthespecifiedschemamapandtheImportXmloperationfails,anerrordialogboxwillbedisplayedwhentheoptionalShowDialogsargumentissettoTrue.
TheXMLdatabeingimportedneedsto"match"theXmlMapit'sbeingimportedinto—thatis,theXPathscontainedintheXmlMapentriesandfieldsshouldcorrespondtosomeelementorattributeintheimporteddata.
Duringanasynchronousbinding,alldata-bindingobjectmodelcallsthatincludeXmlMap.ImportXmlwillreturnanerrormessagethatsaystherequestedoperationcannotbecompletedbecauseanasynchronousbindingisinprogress.Objectmodelcallswillstarttosucceedwhentheasynchronousbindingiscomplete.
![Page 562: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/562.jpg)
ExampleThisexampleshowshowyoucanusetheCanQuerypropertytofirstcheckwhetherabindingcanbequeried.Ifitcan,thecoderefreshesthebinding.AneventhandertrapstheBindingCompletedevent,whichthencallstheExportXmlInfofunction,passinganotherinstanceoftheSpreadsheetcomponentasanargumenttothatfunction.IntheExportXmlInfofunction,theExportXMLmethodiscalledandtheXMLdatastreamisreturnedtothecallingfunctionandusedastheinputfortheImportXmlmethod.
DimobjBindingDimobjBindingsDimobjXmlStringInDimobjXmlMap
SetobjXmlMap=Spreadsheet1.ActiveWorkbook.XmlMaps.Item(1)SetobjBindings=Spreadsheet1.ActiveWorkbook.XmlDataBindings
ForEachobjBindingInobjBindingsIfobjBinding.CanQuery=TrueobjBinding.RefreshEndIfNext
SubSpreadsheet1_BindingCompleted(bindingID,Action)
DimobjXmlStringInDimobjXmlMap
'WriteoutthedatainthespecifiedmaptoanXMLdatastream.objXmlStringIn=ExportXmlInfo(Spreadsheet2)
![Page 563: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/563.jpg)
'UsetheXMLdatastreambypassingitastheargumenttotheImportXmlmethod.objXmlMap.ImportXmlobjXmlStringIn
EndSub
FunctionExportXmlInfo(Spreadsheet2)DimobjXmlMap
SetobjXmlMap=Spreadsheet2.ActiveWorkbook.XmlMaps.Item(1)'Returnthemaptothecallingfunction.ExportXmlInfo=objXmlMap.ExportXml()EndFunction
NoteForinformationontrappingtheBindingCompletedeventfromscriptrunninginaWebpage,seetheBindingCompletedeventtopic.
![Page 564: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/564.jpg)
InsertMethod
Insertsacellorarangeofcellsintotheworksheetandshiftsothercellsawaytomakespace.
expression.Insert(Shift)
expressionRequired.AnexpressionthatreturnsaRangeobject.
ShiftOptionalVariant.Specifieswhichwaytoshiftthecells.CanbeoneofthefollowingXlInsertShiftDirectionconstants:xlShiftToRightorxlShiftDown.Ifthisargumentisomitted,MicrosoftExceldecidesbasedontheshapeoftherange.
![Page 565: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/565.jpg)
InsertFieldSetMethod
Insertsafieldsetonthespecifiedaxis.
expression.InsertFieldSet(FieldSet,Before,Remove)
expressionAnexpressionthatreturnsaPivotAxis,PivotDataAxis,PivotFilterAxis,orPivotGroupAxisobject.
FieldSetRequiredPivotFieldSetobject.Specifiesthefieldsettobeinserted.
BeforeOptionalVariant.Specifiestheindexofthefieldsetbeforewhichtheinsertedfieldsetwillbeplaced.
RemoveOptionalBoolean.Thisargumentisreservedforfutureuse,anditsvalueisalwaysTrue.Whenthefieldsetisaddedtothespecifiedaxis,itisremovedfromanyotheraxis.
![Page 566: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/566.jpg)
ExampleThisexampleaddsafieldsettotherowaxis,dataaxis,andfilteraxisofPivotTable1.
SubAdd_Fields_To_PivotTable()DimvwViewDimptConstantsDimtotOrderCountSetptConstants=PivotTable1.ConstantsSetvwView=PivotTable1.ActiveView'AddtheShipCountryfieldtotherowaxis.vwView.RowAxis.InsertFieldSetvwView.FieldSets("ShipCountry")'AddtheOrderIdfieldtothedataaxis.vwView.DataAxis.InsertFieldSetvwView.FieldSets("OrderID")'AddtheShipViafieldtothefilteraxisvwView.FilterAxis.InsertFieldSetvwView.FieldSets("ShipVia")'Createatotalnamed"OrderCount"thatcountstheOrderIDfield.SettotOrderCount=vwView.AddTotal("OrderCount",vwView.FieldSets("OrderId").Fields("OrderId"),_ptConstants.plFunctionCount)'AddtheOrderCounttotaltothedataaxis.vwView.DataAxis.InsertTotaltotOrderCountEndSub
![Page 567: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/567.jpg)
InsertTotalMethod
AddsaPivotTotalobjecttothePivotTotalscollection.
expression.InsertTotal(Total,Before)
expressionAnexpressionthatreturnsaPivotDataAxisobject.
TotalRequiredPivotTotalobject.Specifiesthetotaltobeinserted.
BeforeOptionalVariant.Specifiestheindexofthetotalbeforewhichtheinsertedtotalwillbeplaced.Ifyoudonotspecifythisargument,thetotalisinsertedattheendofthecollection.
![Page 568: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/568.jpg)
RemarksIfthePivotTotalobjectiscurrentlypartofthePivotTotalscollection,theobjectisfirstremovedfromthatcollectionandthenreinsertedintoit.Thischangesthedisplayorderbecausetotalsaredisplayedintheircollectionorder.
![Page 569: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/569.jpg)
ExampleThisexampleaddsatotalnamed"TotalBudget"thatsumsthevaluesintheBudgetfieldtoPivotTable1,thentheninsertsthetotalintothePivotTableview.
SubAdd_Total()DimvwViewDimptConstantsDimtotNewTotal
SetvwView=PivotTable1.ActiveViewSetptConstants=PivotTable1.Constants'Addanewtotalnamed"TotalBudget"tothecurrentview.SettotNewTotal=vwView.AddTotal("TotalBudget",vwView.Fieldsets("budget").Fields(0),_ptConstants.plFunctionSum)'InsertthenewlycreatedtotalintothedetailareaofthePivotTable.vwView.DataAxis.InsertTotaltotNewTotal
EndSub
![Page 570: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/570.jpg)
ShowAll
![Page 571: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/571.jpg)
IsButtonEnabledMethod
IsButtonEnabledmethodasitappliestotheDataPageobject.
IsButtonEnabledmethodasitappliestotheRecordNavigationControlobject.
![Page 572: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/572.jpg)
ItemMethod
ReturnsaNameobjectfromtheNamescollection.
expression.Item(Index,IndexLocal,RefersTo)
expressionRequired.AnexpressionthatreturnsaNamesobject.
IndexOptionalVariant.Thenameornumberofthedefinednametobereturned.
IndexLocalOptionalVariant.Thenameofthedefinedname,inthelanguageoftheuser.Nonameswillbetranslatedifyouusethisargument.
RefersToOptionalVariant.Thisargumentisnotsupported.
![Page 573: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/573.jpg)
RemarksYoumustspecifyone,andonlyone,ofthesethreearguments.
![Page 574: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/574.jpg)
ExampleThisexampledeletesthename"SortRange"fromtheworkbook.
Spreadsheet1.ActiveWorkbook.Names("SortRange").Delete
![Page 575: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/575.jpg)
LargeScrollMethod
Scrollsthecontentsofthewindowbypages.Thesizeofthepagesisdeterminedbythenumberofrowsandcolumnsvisibleintheactivewindow.
expression.LargeScroll(Down,Up,ToRight,ToLeft)
expressionRequired.AnexpressionthatreturnsaWindowobject.
DownOptionalVariant.Thenumberofpagestoscrollthecontentsdown.
UpOptionalVariant.Thenumberofpagestoscrollthecontentsup.
ToRightOptionalVariant.Thenumberofpagestoscrollthecontentstotheright.
ToLeftOptionalVariant.Thenumberofpagestoscrollthecontentstotheleft.
![Page 576: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/576.jpg)
RemarksIfDownandUporToRightandToLeftarebothspecified,thecontentsofthewindowarescrolledbythedifferenceofthearguments.Forexample,ifDownis3andUpis6,thecontentsarescrolledupthreepages.
Anyoftheargumentscanbeanegativenumber.
![Page 577: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/577.jpg)
ExampleThisexamplescrollsthecontentsoftheactivewindowofSpreadsheet1downthreepagesandtotherighttwopages.
Spreadsheet1.ActiveWindow.LargeScroll3,,2
![Page 578: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/578.jpg)
LoadMethod
LoadsXMLchartdatafromaURLorlocalfile.ThefilemustconsistofonlychartingXML,anditcannotcontainanyleadingHTML.Thestringmustbeginwith<scriptlanguage="XML">andendwith</script>.
expression.Load(FileNameAsString)
expressionAnexpressionthatreturnsaChartSpaceobject.
FileNameRequiredString.SpecifiesthefilecontainingXMLchartdata.
![Page 579: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/579.jpg)
ExampleThisexampleloadsthespecifiedXMLdatafile.
ChartSpace1.Load"chart.xml"
![Page 580: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/580.jpg)
LoadTextMethod
Loadsandparsesthespecifiedtextfileintoaworksheet.Thecontentsofthetextfileareloadedintotheworksheetbeginningatthespecifiedcell.Existingcellcontentswillbeoverwritten.
expression.LoadText(File,Delimiters,ConsecutiveDelimAsOne,TextQualifier)
expressionAnexpressionthatreturnsaRangeobject.
FileRequiredString.Specifiesthenameofthetextfile.
DelimitersOptionalString.Specifiesthefielddelimiters.Thedefaultvalueisnodelimiter.
ConsecutiveDelimAsOneOptionalBoolean.Truetohaveconsecutivedelimitersconsideredasasingledelimiter.ThedefaultvalueisFalse.
TextQualifierOptionalString.Specifiesthetextqualifier.Thedefaultvalueisthedoublequotationmarkcharacter.
![Page 581: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/581.jpg)
ExampleThisexampleinsertsatab-delimitedtextfileintotheactiveworksheetofSpreadsheet1.ThecontentsofthetextfilewillbeginincellB10.
Spreadsheet1.ActiveSheet.Range("B10").LoadText"tabfile.txt",Chr$(9)
![Page 582: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/582.jpg)
MakeCurrentMethod
Makesthespecifiedsectionthecurrentsection.
expression.MakeCurrent(ScrollIntoView)
expressionAnexpressionthatreturnsaSectionobject.
ScrollIntoViewOptionalBoolean.SetthisargumenttoTruetoscrollthesectionintoview.ThedefaultvalueisFalse.
![Page 583: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/583.jpg)
MergeMethod
Createsamergedcellfromthespecifiedrange.Whenyoucreateamergedcell,thevalueintheupper-leftcellinthespecifiedrangeisusedforthemergedcellvalue.Allothercellvaluesinthemergedcellareignored.
expression.Merge(Across)
expressionAnexpressionthatreturnsaRangeobject.Thismethodfailsiftherangeonlypartiallyenclosesapreviouslymergedcell.
AcrossOptionalVariant.Truetomergecellsineachrowinthespecifiedrangeasseparatemergedcells.ThedefaultvalueisFalse.
![Page 584: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/584.jpg)
ExampleThisexamplecreatesamergedcellfromtherangeB2:C5andputsathickredborderaroundthemergedcell.
SubMerge_Cells()DimssConstantsDimrngMerged
SetssConstants=Spreadsheet1.Constants
'MergecellsB2:C5.Spreadsheet1.ActiveSheet.Range("B2:C5").Merge
'Setavariabletothemergedrange.SetrngMerged=Spreadsheet1.ActiveSheet.Range("B2").MergeArea
'Formatthemergedcell.rngMerged.Borders.Color="Red"rngMerged.Borders.Weight=ssConstants.owcLineWeightThickrngMerged.HorizontalAlignment=ssConstants.xlHAlignCenterrngMerged.VerticalAlignment=ssConstants.xlVAlignCenterEndSub
![Page 585: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/585.jpg)
MoveMethod
Movesthesheettoanotherlocationintheworkbook.
expression.Move(Before,After)
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
BeforeOptionalVariant.Thesheetbeforewhichthemovedsheetwillbeplaced.YoucannotspecifyBeforeifyouspecifyAfter.
AfterOptionalVariant.Thesheetafterwhichthemovedsheetwillbeplaced.YoucannotspecifyAfterifyouspecifyBefore.
![Page 586: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/586.jpg)
MoveDetailLeftMethod
Scrollsthedetailareatotheleftstartingatthespecifiedcolumnmember.
expression.MoveDetailLeft(DetailLeft,DetailLeftOffset,Update)
expressionRequired.AnexpressionthatreturnsaPivotColumnMemberobject.
DetailLeftRequiredLong.Anindexnumberindicatingforthecelltouseasthebasisforscrolling.Forexample,useavalueof2tostartthescrollingatthethirdcolumninthedetailarea.
DetailLeftOffsetRequiredLong.Thenumberofpixelstoscroll.
UpdateOptionalBoolean.Determineswhetherornotthedisplayisupdated.ThedefaultvalueisTrue.
![Page 587: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/587.jpg)
ExampleThisexamplescrollsthedetailareatotheleftby10pixelsstartingatthesecondcolumn.
SubScrollDetailColumns()
DimptDataDimpmColumnMember
SetptData=PivotTable1.ActiveData
SetpmColumnMember=ptData.ColumnAxis.Member
'Scrollthefirstcolumninthedetailarea'theleftby10pixels.pmColumnMember.MoveDetailLeft1,10
EndSub
![Page 588: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/588.jpg)
MoveDetailTopMethod
Scrollsthethedetailareadownstartingatthespecifiedcell.
expression.MoveDetailTop(DetailTop,DetailTopOffset,Update)
expressionRequired.AnexpressionthatreturnsaPivotCellobject.
DetailTopRequiredLong.Anindexnumberindicatingthecelltouseasthebasisforscrolling.Forexample,useavalueof5tostartthescrollingatthesixthrowinthedetailarea.
DetailTopOffsetRequiredLong.Thenumberofpixelstoscroll.Use0toscrolltherecordspecifiedintheDetailTopargumenttothetopofthedetailarea.
UpdateOptionalBoolean.Determineswhetherornotthedisplayisupdated.ThedefaultvalueisTrue.
![Page 589: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/589.jpg)
RemarksUsetheMoveDetailLeftmethodtoscrollthedetailareatotheleft.
![Page 590: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/590.jpg)
ExampleThisexamplescrollsthefifteenthrowtothefirstrowdisplayedinthedetailarea.
SubScrollDetailArea()
DimptDataDimpmColumnMemberDimpmRowMember
SetptData=PivotTable1.ActiveData
SetpmRowMember=ptData.RowAxis.MemberSetpmColumnMember=ptData.ColumnAxis.Member
'Startingatthe15throwofthedetailarea,scroll100pixels.ptData.Cells(pmRowMember,pmColumnMember).MoveDetailTop
EndSub
![Page 591: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/591.jpg)
MoveFirstMethod
Movestothefirstrecordinthedataaccesspagerecordset.Thismethodfailsifthecurrentrecordisthefirstrecordintherecordset.
expression.MoveFirst
expressionAnexpressionthatreturnsaDataPageobject.
![Page 592: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/592.jpg)
MoveLastMethod
Movestothelastrecordinthedataaccesspagerecordset.Thismethodfailsifthecurrentrecordisthelastrecordintherecordset.
expression.MoveLast
expressionAnexpressionthatreturnsaDataPageobject.
![Page 593: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/593.jpg)
MoveLeftMethod
Scrollsacolumnfieldmemberleftbythespecifiednumberofpixels,oruntilthenextrowmemberhasbeenscrolledtotheleftsideofthedisplay.
expression.MoveLeft(Left,LeftOffset,Update)
expressionRequired.AnexpressionthatreturnsaPivotDataobject.
LeftRequiredPivotColumnMemberobject.Thecolumnmembertoscroll.
LeftOffsetRequiredLong.Thenumberofpixelstoscrollthemember.
UpdateOptionalBoolean.Determineswhetherornotthedisplayisupdated.ThedefaultvalueisTrue.
![Page 594: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/594.jpg)
RemarksUsetheMoveToppropertytoscrollrowfieldmembers.
![Page 595: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/595.jpg)
ExampleThisexamplescrollsthePivotTableviewtothenextcolumnmember.
SubScrolltoNextColumnMember()
DimptData
SetptConstants=PivotTable1.Constants
SetptData=PivotTable1.ActiveData
'Scrolltothenextcolumnmember.ptData.MoveLeftptData.Left,1000
EndSub
![Page 596: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/596.jpg)
MoveNextMethod
Movestothenextrecordinthedataaccesspagerecordset.Thismethodfailsifthecurrentrecordisthelastrecordintherecordset.
expression.MoveNext
expressionAnexpressionthatreturnsaDataPageobject.
![Page 597: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/597.jpg)
MovePreviousMethod
Movestothepreviousrecordinthedataaccesspagerecordset.Thismethodfailsifthecurrentrecordisthefirstrecordintherecordset.
expression.MovePrevious
expressionAnexpressionthatreturnsaDataPageobject.
![Page 598: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/598.jpg)
MoveTopMethod
Scrollsarowfieldmemberupbythespecifiednumberofpixels,oruntilthenextrowmemberhasbeenscrolledtothetopofthedisplay.
expression.MoveTop(Top,TopOffset,Update)
expressionRequired.AnexpressionthatreturnsaPivotDataobject.
TopRequiredPivotRowMemberobject.Therowmembertoscroll.
TopOffsetRequiredLong.Thenumberofpixelstoscrollthemember.
UpdateOptionalBoolean.Determineswhetherornotthedisplayisupdated.ThedefaultvalueisTrue.
![Page 599: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/599.jpg)
RemarksUsetheMoveLeftpropertytoscrollcolumnfieldmembers.
![Page 600: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/600.jpg)
ExampleThisexamplescrollsthePivotTableviewtothenextrowmember.
SubScrolltoNextRowMember()
DimptData
SetptConstants=PivotTable1.Constants
SetptData=PivotTable1.ActiveData
'Scrolltothenextrowmember.ptData.MoveTopptData.Top,1000
EndSub
![Page 601: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/601.jpg)
NewRecordMethod
Addsanewrecordtothedataaccesspagerecordset.Thismethodfailsiftherecordsetcannotbeupdated.
expression.NewRecord
expressionAnexpressionthatreturnsaDataPageobject.
![Page 602: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/602.jpg)
NzMethod
Usethismethodtoreturnzero,azero-lengthstring(""),oranotherspecifiedvaluewhenavalueisNull.Forexample,youcanusethisfunctiontoconvertaNullvaluetoanothervalueandpreventitfrompropagatingthroughanexpression.ReturnsaVariant.
expression.Nz(Value,ValueIfNull)
expressionRequired.AnexpressionthatreturnsaDataSourceControlobject.
ValueRequiredVariant.Thevaluetoconvert.
ValueIfNullOptionalVariant.ValuetoreturniftheValueargumentargumentisNull.Thisargumentenablesyoutoreturnavalueotherthanzeroorazero-lengthstring.
![Page 603: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/603.jpg)
RemarksThismethodisusefulforexpressionsthatmayincludeNullvalues.Toforceanexpressiontoevaluatetoanon-NullvalueevenwhenitcontainsaNullvalue,usethethismethodtoreturnazero,azero-lengthstring,oracustomreturnvalue.
Forexample,theexpression2+varXwillalwaysreturnaNullvaluewhentheVariantvarXisNull.However,2+MSODSC.Nz(varX)returns2.
Inthenextexample,theoptionalargumentsuppliedtotheNzmethodprovidesthestringtobereturnedifvarFreightisNull.
varResult=MSODSC.Nz(varFreight,"NoFreightCharge")
![Page 604: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/604.jpg)
OverrideDefaultElementFormattingMethod
YouusetheOverrideDefaultElementFormattingmethodtousethedrawingformatofthecurrentChChartDrawobjecttodrawachart.ReturnsNothing.
expression.OverrideDefaultElementFormatting()
expressionRequired.AnexpressionthatreturnsaChChartDrawobject.
![Page 605: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/605.jpg)
Remarks
MostchartelementsthatgenerateaBeforeRendereventinitializethedrawingsurfacebyusingthedefaultformattingoftheChartcomponent.YoucanusetheOverrideDefaultElementFormattingmethodintheBeforeRendereventproceduretochangethedefaultpropertiesofthecurrentChChartDrawobjectpassedtotheBeforeRendereventasitsdrawObjectparameter.
![Page 606: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/606.jpg)
ExampleThefollowingexampleusestheOverrideDefaultElementFormattingmethodtochangeapropertyoftheChChartDrawobject:
SubChartspace_BeforeRender(drawObjectAsChChartDraw,chartObjectAsObject,CancelAsByRef) OnErrorResumeNext
'Thisformatwillbeappliedonlytoalllegends. IfTypeName(chartObject)="ChLegend"Then drawObject.border.weight=5 drawObject.border.color="green" drawObject.OverrideDefaultElementFormatting EndIf 'Thisformatwillonlybeappliedtoalltitles. IfTypeName(chartObject)="ChTitle"Then drawObject.border.weight=10 drawObject.border.color="violet" drawObject.OverrideDefaultElementFormatting EndIfEndSub
SubChartspace_AfterRender(drawObjectAsChChartDraw,chartObjectAsObject) SelectCaseTypeName(chartObject) Case"ChLegend","ChTitle" 'ChartspacewillapplytheoverrideddrawObjectformattotheTitleandLegendobjects. drawObject.DrawRectanglechartObject.Left,_ chartObject.Top,chartObject.right,chartObject.bottom EndSelectEndSub
![Page 607: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/607.jpg)
ParseTextMethod
Parsesthespecifiedtextstringandplacestheresultinthespecifiedrange.
expression.ParseText(Text,Delimiters,ConsecutiveDelimAsOne,TextQualifier)
expressionAnexpressionthatreturnsaRangeobject.
TextRequiredString.Specifiesthestringtobeparsed.
DelimitersOptionalString.Specifiesthefielddelimiters.
ConsecutiveDelimAsOneOptionalBoolean.Truetohaveconsecutivedelimitersconsideredasonedelimiter.ThedefaultvalueisFalse.
TextQualifierOptionalString.Specifiesthetextqualifier.Thedefaultvalueisthedoublequotationmarkcharacter.
![Page 608: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/608.jpg)
ExampleThisexampleparsesthespecifiedstringintotherangestartingatcellA1.
Spreadsheet1.ActiveSheet.Range("A1").ParseText"name,address,city,state",","
![Page 609: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/609.jpg)
ShowAll
![Page 610: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/610.jpg)
PasteMethod
PastemethodasitappliestotheWorksheetobject.
PastemethodasitappliestotheRangeobject.
![Page 611: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/611.jpg)
ExampleAsitappliestotheWorksheetobject.
AsitappliestotheRangeobject.
![Page 612: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/612.jpg)
PointsToScreenPixelsXMethod
ReturnsaLongvaluethatrepresentsthenumberofpixelsfromtheleftedgeofthespreadsheet'swindowtotheleftedgethefirstcolumninthespreadsheet,plusthevaluespecifiedinthePointsargument.
expression.PointsToScreenPixelsX(Points)
expressionRequired.AnexpressionthatreturnsaWindowobject.
PointsRequiredLong.Thenumberofpixelstoaddtothismethod'sresult.
![Page 613: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/613.jpg)
RemarksAlthoughthenameofthismethodsuggeststhatitwillconvertpointvaluestoscreenpixelvalues,itactuallyperformstheactiondescribedaboveusingonlypixelvalues.ForthePointsToScreenPixelsXmethod,thisvaluewillvarybyafixedamount(24pixels)dependingonwhetherrowheadersareturnedon.
![Page 614: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/614.jpg)
ExampleThisexamplereturns25whenrowheadersareturnedon,andreturns1whenrowheadersareturnedoff.
SubWindow_OnLoad()
MsgBoxSpreadsheet1.ActiveWindow.PointsToScreenPixelsX(0)
EndSub
![Page 615: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/615.jpg)
PointsToScreenPixelsYMethod
ReturnsaLongvaluethatrepresentsthenumberofpixelsfromthetopedgeofthespreadsheet'swindowtothetopedgeofthefirstrowinthespreadsheet,plusthevaluespecifiedinthePointsargument.
expression.PointsToScreenPixelsY(Points)
expressionRequired.AnexpressionthatreturnsaWindowobject.
PointsRequiredLong.Thenumberofpixelstoaddtothismethod'sresult.
![Page 616: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/616.jpg)
RemarksAlthoughthenameofthismethodsuggeststhatitwillconvertpointvaluestoscreenpixelvalues,itactuallyperformstheactiondescribedaboveusingonlypixelvalues.ForthePointsToScreenPixelsYmethod,thisvaluewillvarydependingonwhetherthetoolbar(22pixels)andcolumnheaders(17pixels)areturnedon.
![Page 617: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/617.jpg)
ExampleThisexamplereturns40whenboththetoolbarandcolumnheadersareturnedon,andreturns1whenthetoolbarandcolumnheadersareturnedoff.
SubWindow_OnLoad()
MsgBoxSpreadsheet1.ActiveWindow.PointsToScreenPixelsY(0)
EndSub
![Page 618: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/618.jpg)
ShowAll
![Page 619: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/619.jpg)
ProtectMethod
ProtectmethodasitappliestotheWorksheetobject.
ProtectmethodasitappliestotheWorkbookobject.
![Page 620: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/620.jpg)
RemarksSettinganunsupportedargumenttoTruewillresultinanrun-timeerror.
![Page 621: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/621.jpg)
ExampleAsitappliestotheWorksheetobject.
![Page 622: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/622.jpg)
ShowAll
![Page 623: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/623.jpg)
RangeFromPointMethod
RangeFromPointmethodasitappliestotheChartSpaceobject.
RangeFromPointmethodasitappliestotheWindowobject.
![Page 624: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/624.jpg)
ExampleAsitappliestotheChartSpaceobject.
![Page 625: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/625.jpg)
RectIntersectMethod
ReturnsaRangeobjectthatrepresentstherectangularintersectionofthespecifiedranges.ReturnsNothingifthespecifiedrangesdonotoverlap.
expression.RectIntersect(Range1,Range2)
expressionRequired.AnexpressionthatreturnsaSpreadsheetobject
Range1RequiredRange.
Range2RequiredRange.
![Page 626: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/626.jpg)
ExampleThisexampleboldsthecellswherethenamedrange"Range1"overlapsthenamedrange"Range2"intheactivesheetofSpreadsheet1.
SubBoldIntersection()
DimrngIntersectDimrngFirstRangeDimrngSecondRange
'Setavariabletothefirstnamedrange.SetrngFirstRange=Spreadsheet1.ActiveSheet.Range("Range1")
'Setavariabletothesecondnamedrange.SetrngSecondRange=Spreadsheet1.ActiveSheet.Range("Range2")
'Setavariabletotheintersectionofthetwonamedranges.SetrngIntersect=Spreadsheet1.RectIntersect(rngFirstRange,rngSecondRange)
'Checkwhetherthenamedrangesoverlap.IfNotrngIntersectIsNothingThen
'Boldthefontintheoverlappingportion'ofthetworanges.rngIntersect.Font.Bold=True
EndIf
EndSub
![Page 627: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/627.jpg)
RectUnionMethod
ReturnsaRangeobjectthatrepresentsthesmallestrangeofcellsthatincludestheunionofthespecifiedranges.
expression.RectUnion(Range1,Range2)
expressionRequired.AnexpressionthatreturnsaSpreadsheetobject.
Range1RequiredRange.
Range2RequiredRange.
![Page 628: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/628.jpg)
RemarksThismethodalwaysreturnsarectangularrange.Forexample,ifyouspecifyA1:A5andF1:F10,thereturnvalueistherectangularrangeA1:F10.Also,youcannotusethismethodtocreatearangecontainingnoncontiguousareas.
![Page 629: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/629.jpg)
ShowAll
![Page 630: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/630.jpg)
RefreshMethod
RefreshmethodasitappliestotheXmlDataBindingobject
![Page 631: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/631.jpg)
RefreshmethodasitappliestoallotherobjectsintheAppliesTolist.
![Page 632: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/632.jpg)
ExampleAsitappliestotheXmlDataBindingobject.
AsitappliestotheChartSpaceobject
![Page 633: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/633.jpg)
RefreshJetCacheMethod
Refreshesthedataaccesspage'sconnectionwithaMicrosoftAccessdatabase.
expression.RefreshJetCache()
expressionRequired.AnexpressionthatreturnsaDataSourceControlobject.
![Page 634: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/634.jpg)
RemoveFieldSetMethod
Removesafieldsetfromthespecifiedaxis.
expression.RemoveFieldSet(FieldSet)
expressionAnexpressionthatreturnsaPivotDataAxis,PivotFilterAxis,orPivotGroupAxisobject.
FieldSetRequiredVariant.Specifiesthefieldsettoberemoved.CanbeaPivotFieldSetobject,afieldsetname,orafieldsetindexnumber.
![Page 635: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/635.jpg)
ExampleThisexampleremovestheShipViafieldfromthefilteraxisinPivotTable1.
PivotTable1.ActiveView.FilterAxis.RemoveFieldSet"ShipVia"
![Page 636: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/636.jpg)
RemoveTotalMethod
Removesatotalfromthespecifieddataaxis.
expression.RemoveTotal(Total)
expressionAnexpressionthatreturnsaPivotDataAxisobject.
TotalRequiredVariant.Specifiesthetotaltoberemoved.CanbeaPivotTotalobject,atotal’sname,oratotal’sindexnumber.
![Page 637: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/637.jpg)
ExampleThisexampleremovestheOrderCounttotalfromthecurrentviewinPivotTable1.
PivotTable1.ActiveView.DataAxis.RemoveTotal"OrderCount"
![Page 638: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/638.jpg)
RepaintMethod
Forcesaredrawofthespecifiedobject.
expression.Repaint
expressionRequired.AnexpressionthatreturnsaChartSpaceorSpreadsheetobject.
![Page 639: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/639.jpg)
RequeryMethod
Executesthequerythatreturnedtherecordsetandallrelatedrecordsetsforthespecifiedobject.
expression.Requery
expressionAnexpressionthatreturnsaDataPageobject.
![Page 640: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/640.jpg)
ResetMethod
ResetsthespecifiedHeadingobject.Usethismethodtoresetaspecificroworcolumnheading.UsetheResetHeadingsmethodifyouwanttoresetallrowandcolumnheadingsinawindowtotheirdefaultvalues.
expression.Reset
expressionRequired.AnexpressionthatreturnsaHeadingobject.
![Page 641: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/641.jpg)
ExampleThisexampleresetsthecaptionofcolumnDintheactivewindowofSpreadsheet1toitsdefaultvalue.
Spreadsheet1.ActiveWindow.ColumnHeadings(4).Reset
![Page 642: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/642.jpg)
ResetColorsMethod
Resetsthecolorpaletteofthespecifiedworkbooktothedefaultcolors.
expression.ResetColors
expressionRequired.AnexpressionthatreturnsaWorkbookobject.
![Page 643: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/643.jpg)
ExampleThefollowingexampleresetsthecolorpaletteoftheworkbookthatisopeninSpreadsheet1backtoitsdefaultsetting.
Spreadsheet1.ActiveWorkbook.ResetColors
![Page 644: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/644.jpg)
ResetHeadingsMethod
Resetstherowandcolumnsheadingsofthespecifiedwindowtotheirdefaultvalues.UsetheResetmethodinsteadifyouwanttoresetspecificrowandcolumnheadings.
expression.ResetHeadings
expressionRequired.AnexpressionthatreturnsaWindowobject.
![Page 645: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/645.jpg)
ExampleThefollowingexampleresetstherowandcolumnheadingsoftheactivewindowinSpreadsheet1totheirdefaultvalues.
Spreadsheet1.ActiveWindow.ResetHeadings
![Page 646: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/646.jpg)
RotateClockwiseMethod
Rotatesallseriesinthespecifiedchartclockwisein90-degreeincrements.
expression.RotateClockwise
expressionAnexpressionthatreturnsaChPlotAreaobject.
![Page 647: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/647.jpg)
ExampleThisexamplerotatesallseriesinthespecifiedchartclockwise90degrees.
ChartSpace1.Charts(0).PlotArea.RotateClockwise
![Page 648: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/648.jpg)
RotateCounterClockwiseMethod
Rotatesallseriesinthespecifiedchartcounterclockwisein90-degreeincrements.
expression.RotateCounterClockwise
expressionAnexpressionthatreturnsaChPlotAreaobject.
![Page 649: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/649.jpg)
ExampleThisexamplerotatesallseriesinthespecifiedchartcounterclockwise90degrees.
ChartSpace1.Charts(0).PlotArea.RotateCounterClockwise
![Page 650: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/650.jpg)
SaveMethod
Savesthecurrentrecordtothedatabaseassociatedwiththespecifieddataaccesspage.
expression.Save
expressionAnexpressionthatreturnsaDataPageobject.
![Page 651: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/651.jpg)
ScrollIntoViewMethod
Scrollsthedocumentwindowsothatthecontentsofaspecifiedrectangularareaaredisplayedineithertheupper-leftorlower-rightcornerofthedocumentwindoworpane(dependingonthevalueoftheStartargument).
expression.ScrollIntoView(Left,Top,Width,Height,Start)
expressionRequired.AnexpressionthatreturnsaWindowobject.
LeftRequiredLong.Thehorizontalpositionoftherectangle(inpoints)fromtheleftedgeofthedocumentwindoworpane.
TopRequiredLong.Theverticalpositionoftherectangle(inpoints)fromthetopofthedocumentwindoworpane.
WidthRequiredLong.Thewidthoftherectangleinpoints.
HeightRequiredLong.Theheightoftherectangleinpoints.
StartOptionalVariant.Truetohavetheupper-leftcorneroftherectangleappearintheupper-leftcornerofthedocumentwindoworpane.Falsetohavethelower-rightcorneroftherectangleappearinthelower-rightcornerofthedocumentwindoworpane.ThedefaultvalueisTrue.
![Page 652: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/652.jpg)
RemarksTheStartargumentisusefulfororientingthescreendisplaywhentherectangleislargerthanthedocumentwindow.
![Page 653: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/653.jpg)
ExampleThisexampledefinesa100-by-200-pixelrectangleintheactivedocumentwindow,positioned20pixelsfromthetopofthewindowand50pixelsfromtheleftedgeofthewindow.Theexamplethenscrollsthedocumentupandtotheleftsothattheupper-leftcorneroftherectangleisalignedwiththeupper-leftcornerofthewindow.
Spreadsheet1.ActiveWindow.ScrollIntoView50,20,100,200
![Page 654: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/654.jpg)
ShowAll
![Page 655: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/655.jpg)
SelectMethod
SelectmethodasitappliestotheChartSpace,ChAxis,ChCategoryLabel,ChChart,ChChartField,ChDataLabel,ChDataLabels,ChErrorBars,ChGridlines,ChLegend,ChLegendEntry,ChPlotArea,ChPoint,ChSeries,ChSurface,ChTitle,ChTrendline,Range,Sheets,Worksheet,andWorksheetsobjects.
SelectmethodasitappliestothePivotTableobject.
![Page 656: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/656.jpg)
ExampleThisexampleselectsthecellthatisonecolumntotherightofandinthesamerowastheactivecell.
Spreadsheet1.ActiveCell.Offset(0,1).Select
![Page 657: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/657.jpg)
ShowAll
![Page 658: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/658.jpg)
Select2Method
YouusetheSelect2methodoftheChPointobjecttoworkwithanobjectinthecollectionofcurrentlyselectedobjects.ReturnsNothing.
expression.Select2(selmode)
expressionRequired.AnexpressionthatreturnsaChPointobject.
selmodeOptionalChartSelectMode.
![Page 659: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/659.jpg)
Remarks
TheSelect2methodissimilartotheSelectmethodoftheChPointobject,excepttheSelect2methodhasanoptionalselmodeparameter.Theprimaryselectionistypicallythefirstobjectselected.Otherselectedobjectsaresecondaryselections.OnlytheprimaryselectionisrecognizedbyChartcomponentmethodsandpropertiesthatworkwiththecurrentselection.
![Page 660: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/660.jpg)
ShowAll
![Page 661: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/661.jpg)
SetDataMethod
Setsdataforthespecifiedchartobject.
expression.SetData(Dimension,DataSourceIndex,DataReference)
expressionAnexpressionthatreturnsaChChart,ChErrorBarsChSeries,orChartSpaceobject.
DimensionRequiredChartDimensionsEnumconstant.Specifiesthedatadimensiontobeset.
DataSourceIndexRequiredLong.CanbeaChartSpecialDataSourcesEnumconstant.
DataReferenceOptionalVariant.ForChChartandChSeriesobjects,thisargumentspecifiesthedatareferenceasaMicrosoftExcel-stylerangereference("A1:D4",forexample),orarow-setcolumnname.WhentheDataSourceIndexargumentissettochDataLiteral,youcansetDataReferencetoaone-dimensionalarrayoracomma-delimitedlist.ForChErrorBarsobjects,thisargumentspecifiesanarrayofDoubleorStringvaluesyoucanuseforerror-barvalues.Notethatyoucanusethisargumentonlywithcustomerrorbars(theerror-barTypepropertymustbesettochErrorBarTypeCustom).
![Page 662: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/662.jpg)
RemarksAlternatively,youcanspecifyaChartErrorBarCustomValuesEnumconstantfortheDimensionargumenttospecifythevaluestouseforerrorbars.
Youcanbindacharttoonlyonedatasource.Forexample,ifyouhavetwochartsinaChartSpace,youcannotbindthemtodifferentdatasources.However,youcanbindachartordataseriestoasetofliteraldataoncethechartorChartSpacehasbeenboundtoanexternaldatasource.
WhenbindingtoanOLAPdatasource,theDataReferenceargumentcanbindtoafieldset,butnotafield.YoucanpassanarrayoffieldstotheDataReferenceargumenttobindtoaspecificfieldorfieldswhenconnectedtoanOLAPdatasource.
![Page 663: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/663.jpg)
ExampleThisexamplecreatesachartusingliteraldataarrays.
SubBindChartToArrays()
DimasSeriesNames(1)DimasCategories(7)DimaiValues(7)DimchConstantsDimchtNewChart
asSeriesNames(0)="SatisfactionData"
asCategories(0)="VeryGood"asCategories(1)="Good"asCategories(2)="N/A"asCategories(3)="Average"asCategories(4)="NoResponse"asCategories(5)="Poor"asCategories(6)="VeryPoor"
aiValues(0)=10aiValues(1)=22aiValues(2)=6aiValues(3)=31aiValues(4)=5aiValues(5)=14aiValues(6)=12
SetchConstants=ChartSpace1.Constants
![Page 664: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/664.jpg)
'AddanewcharttoChartspace1.SetchtNewChart=ChartSpace1.Charts.Add
'Specifythatthechartisacolumnchart.chtNewChart.Type=chConstants.chChartTypeColumnClustered
'Bindthecharttothearrays.chtNewChart.SetDatachConstants.chDimSeriesNames,chConstants.chDataLiteral,asSeriesNameschtNewChart.SetDatachConstants.chDimCategories,chConstants.chDataLiteral,asCategorieschtNewChart.SeriesCollection(0).SetDatachConstants.chDimValues,chConstants.chDataLiteral,aiValues
EndSub
Thisexamplecreatesachartthatisboundtoaspreadsheet.TheseriesnameisincellB1,thecategorynamesareincellsA2:A28,andthevaluesareincellsB2:B28.
SubBindToSpreadsheet()DimchConstantsDimchtChart1
SetchConstants=ChartSpace1.Constants
'SetthedatasourceofChartSpace1toSpreadsheet1.SetChartSpace1.DataSource=Spreadsheet1
'SetavariabletoanewchartinChartspace1.SetchtChart1=ChartSpace1.Charts.Add
'Setthecharttype.chtChart1.Type=chConstants.chChartTypeLineMarkers
![Page 665: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/665.jpg)
'BindtheseriesnametocellB1inthefirstsheetofSpreadsheet1.chtChart1.SetDatachConstants.chDimSeriesNames,chConstants.chDataBound,"B1"
'BindthecategoryaxistocellA2:A28inthefirstsheetofSpreadsheet1.chtChart1.SetDatachConstants.chDimCategories,chConstants.chDataBound,"A2:A28"
'BindthevaluesofthedataseriestocellsB2:B28inthefirstsheetofSpreadsheet1.chtChart1.SeriesCollection(0).SetDatachConstants.chDimValues,chConstants.chDataBound,"B2:B28"
EndSub
ThefollowingexamplebindsChartspace1totheOrderDetailstableintheSQLServerNorthwinddatabase.Then,aformatmapiscreated.Thesmallervaluesaredisplayedinwhite,thenlargervaluesaredisplayedinalightshadeofblue,andfinallythelargestvaluesinthechartaredisplayedindarkblue.
SubWindow_Onload()
DimserSeries1DimsegSegment1DimchConstants
SetchConstants=ChartSpace1.Constants
'ThefollowingtwolinesofcodebindChartspace1totheOrderDetailstableinthe'NorthwindSQLServerdatabase.ChartSpace1.ConnectionString="Provider=SQLOLEDB.1;PersistSecurityInfo=TRUE;"&_"IntegratedSecurity=SSPI;InitialCatalog=Northwind;"&_"DataSource=ServerName;"ChartSpace1.DataMember="OrderDetails"
'ThefollowingtwolinesofcodebindChartspace1totheQuantityandProductIDfields
![Page 666: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/666.jpg)
'intheOrderdetailstable.ChartSpace1.SetDatachConstants.chDimCategories,chConstants.chDataBound,"ProductID"ChartSpace1.SetDatachConstants.chDimValues,chConstants.chDataBound,"Quantity"
'Createaformatmap.ChartSpace1.SetDatachConstants.chDimFormatValues,chConstants.chDataBound,"Quantity"
'SetavariabletothefirstseriesinthefirstchartinChartspace1.SetserSeries1=ChartSpace1.Charts(0).SeriesCollection(0)
'Addasegmenttotheformatmap.SetsegSegment1=serSeries1.FormatMap.Segments.Add
'Specifythatthedivisionsinformattingbecreatedautomatically.segSegment1.HasAutoDivisions=True
'Measurethesegmentboundariesbaseduponapercentage.segSegment1.Begin.ValueType=chConstants.chBoundaryValuePercentsegSegment1.End.ValueType=chConstants.chBoundaryValuePercent
'Setthebeginningvalueto0%,andtheendingvalueto100%.segSegment1.Begin.Value=0segSegment1.End.Value=1
'Formattheinteriorofthematchingvalues.segSegment1.Begin.Interior.Color="White"segSegment1.End.Interior.Color="Blue"
EndSub
![Page 667: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/667.jpg)
SetExtentMethod
YouusetheSetExtentmethodtotospecifytheviewextentoftheChScrollViewobjectofaChartcomponent.ReturnsNothing.
expression.SetExtent(HorizontalExtent,VerticalExtent)
expressionRequired.AnexpressionthatreturnsaChScrollViewobject.
HorizontalExtentRequiredLong.
VerticalExtentRequiredLong.
![Page 668: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/668.jpg)
Remarks
UsingthismethodtospecifythecurrentscrollviewpositionhasthesameeffectassettingtheHorizontalExtentandVerticalExtentpropertiesindividually.IfyouusetheSetExtentmethodratherthantheHorizontalExtentandVerticalExtentpropertiesindividually,however,lessrepaintingwilloccur.
YouusemethodsandpropertiesoftheChScrollViewobjecttoretrieveinformationaboutandcontroltheviewofachart.TheportionoftheChartcomponentthatdisplaysthechartitselfisthevisibleplotareaanditcandisplaytheentirechartoraportionofthechart.Whenonlyaportionofthechartisdisplayedinthevisibleplotarea,theeffectisasifyouhavezoomedinonthatportionofthechartandtheremainderofthechartiscontainedwithinavirtualplotareathatextendsbeyondtheboundaryofthevisibleplotarea.ForinformationonhowthevaluesofthepropertiesoftheChScrollViewobjectrelatetoeachother,seetheChScrollViewobjecttopic.
TheVerticalPositionandHorizontalPositionpropertiesdescribetheupper-leftcornerofthevisibleplotarea.TheVerticalExtentandHorizontalExtentpropertiesdescribethelower-rightcornerofthevisibleplotarea.Becauseyouwillfrequentlyworkwiththesepropertiestogether,youcanuseSetPositionmethodtospecifytheupper-leftcornerofthevisibleplotareaandtheSetExtentmethodtospecifythelower-rightcorner.
![Page 669: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/669.jpg)
ExampleThefollowingexampleusestheSetExtentmethodtosettheverticalandhorizontalextentofthescrollviewofacharttozoomby200percent.
DimlngHMaxDimlngVMax
lngHMax=ChartSpace1.Charts(0).ScrollView.HorizontalExtentMax*2lngVMax=ChartSpace1.Charts(0).ScrollView.VerticalExtentMax*2
ChartSpace1.Charts(0).ScrollView.SetExtentlngHMax,lngVMax
![Page 670: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/670.jpg)
ShowAll
![Page 671: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/671.jpg)
SetOneColorGradientMethod
FillsthespecifiedChInteriorobjectwithaone-colorgradient.
expression.SetOneColorGradient(GradientStyle,GradientVariant,GradientDegree,Color)
expressionRequired.AnexpressionthatreturnsaChInteriorobject.
GradientStyleRequiredChartGradientStyleEnum.Thegradientstyle.
GradientVariantRequiredChartGradientVariantEnum.Thegradientvariant.
GradientDegreeRequiredDouble.Thegradientdegree.Canbeavaluefrom0.0(dark)through1.0(light).
ColorOptionalVariant.Theforegroundcolorforthegradient.YoucanuseeitheraLongvaluerepresentingared-green-bluecolorvalueoraStringvaluenamingavalidHTMLcolorvalue.InMicrosoftVisualBasic,youcanusetheRGBfunctiontocreateared-green-bluecolorvalue(forexample,redisRGB(255,0,0)).Ifthisargumentisomitted,thentheColorpropertyisused.
![Page 672: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/672.jpg)
ExampleThisexamplesetstheinteriorfillofthefirsttwoseriesandtheplotareaofthefirstchartinChartSpace1.
SubFormatInteriorColors()
DimchConstantsDimserSeries1DimserSeries2
SetchConstants=ChartSpace1.Constants
SetserSeries1=ChartSpace1.Charts(0).SeriesCollection(0)SetserSeries2=ChartSpace1.Charts(0).SeriesCollection(1)
'Settheinteriorfillofthefirstseriestoaone-colorgradient.serSeries1.Interior.SetOneColorGradientchConstants.chGradientDiagonalDown,_chConstants.chGradientVariantCenter,0.2,"Blue"
'Settheinteriorfillofthesecondseriestoapresetgradient.serSeries2.Interior.SetPresetGradientchConstants.chGradientFromCenter,_chConstants.chGradientVariantEnd,chConstants.chGradientDaybreak
'Settheinteriorfilloftheplotareatoapattern.ChartSpace1.Charts(0).PlotArea.Interior.SetPatternedchConstants.chPattern10Percent,_"Yellow","Blue"
EndSub
![Page 673: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/673.jpg)
ShowAll
![Page 674: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/674.jpg)
SetPatternedMethod
FillsthespecifiedChInteriorobjectwithapresetpattern.
expression.SetPatterned(patternType,Color,BackColor)
expressionRequired.AnexpressionthatreturnsaChInteriorobject.
patternTypeRequiredChartPatternTypeEnum.Thepatternstyle.
ColorOptionalVariant.Theforegroundcolorforthepattern.YoucanuseeitheraLongvaluerepresentingared-green-bluecolorvalueoraStringvaluenamingavalidHTMLcolorvalue.InMicrosoftVisualBasic,youcanusetheRGBfunctiontocreateared-green-bluecolorvalue(forexample,redisRGB(255,0,0)).Ifthisargumentisomitted,thentheColorpropertyisused.
BackColorOptionalVariant.Thebackgroundcolorforthepattern.YoucanuseeitheraLongvaluerepresentingared-green-bluecolorvalueoraStringvaluenamingavalidHTMLcolorvalue.InMicrosoftVisualBasic,youcanusetheRGBfunctiontocreateared-green-bluecolorvalue(forexample,redisRGB(255,0,0)).Ifthisargumentisomitted,thentheBackColorpropertyisused.
![Page 675: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/675.jpg)
ExampleThisexamplesetstheinteriorfillofthefirsttwoseriesandtheplotareaofthefirstchartinChartSpace1.
SubFormat_Interior_Colors()
DimchConstantsDimserSeries1DimserSeries2
SetchConstants=ChartSpace1.Constants
SetserSeries1=ChartSpace1.Charts(0).SeriesCollection(0)SetserSeries2=ChartSpace1.Charts(0).SeriesCollection(1)
'Settheinteriorfillofthefirstseriestoaone-colorgradient.serSeries1.Interior.SetOneColorGradientchConstants.chGradientDiagonalDown,_chConstants.chGradientVariantCenter,0.2,"Blue"
'Settheinteriorfillofthesecondseriestoapresetgradient.serSeries2.Interior.SetPresetGradientchConstants.chGradientFromCenter,_chConstants.chGradientVariantEnd,chConstants.chGradientDaybreak
'Settheinteriorfilloftheplotareatoapattern.ChartSpace1.Charts(0).PlotArea.Interior.SetPatternedchConstants.chPattern10Percent,_"Yellow","Blue"
EndSub
![Page 676: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/676.jpg)
SetPositionMethod
YouusetheSetPositionmethodtotospecifythecurrentviewpositionoftheChScrollViewobjectofaChartcomponent.ReturnsNothing.
expression.SetPosition(HorizontalPosition,VerticalPosition)
expressionRequired.AnexpressionthatreturnsaChScrollViewobject.
HorizontalPositionRequiredLong.
VerticalPositionRequiredLong.
![Page 677: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/677.jpg)
Remarks
UsingthismethodtospecifythecurrentscrollviewpositionhasthesameeffectassettingtheHorizontalPositionandVerticalPositionpropertiesindividually.IfyouusetheSetPositionmethodratherthantheHorizontalPositionandVerticalPositionpropertiesindividually,however,lessrepaintingwilloccur.
YouusemethodsandpropertiesoftheChScrollViewobjecttoretrieveinformationaboutandcontroltheviewofachart.TheportionoftheChartcomponentthatdisplaysthechartitselfisthevisibleplotarea,anditcandisplaytheentirechartoraportionofthechart.Whenonlyaportionofthechartisdisplayedinthevisibleplotarea,theeffectisasifyouhavezoomedinonthatportionofthechart;theremainderofthechartiscontainedwithinavirtualplotareathatextendsbeyondtheboundaryofthevisibleplotarea.ForinformationonhowthevaluesofthepropertiesoftheChScrollViewobjectrelatetoeachother,seetheChScrollViewobjecttopic.
TheVerticalPositionandHorizontalPositionpropertiesdescribetheupper-leftcornerofthevisibleplotarea.TheVerticalExtentandHorizontalExtentpropertiesdescribethelower-rightcornerofthevisibleplotarea.Becauseyouwillfrequentlyworkwiththesepropertiestogether,youcanuseSetPositionmethodtospecifytheupper-leftcornerofthevisibleplotareaandtheSetExtentmethodtospecifythelower-rightcorner.
![Page 678: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/678.jpg)
ExampleThisexampleshowsthelower-leftcornerofazoomedchartinthelower-leftcornerofthevisibleplotarea.
DimlngVEDimlngHEDimlngVEMDimlngHEMDimobjScrollView
SetobjScrollView=ChartSpace1.Charts(0).ScrollViewlngVE=objScrollView.VerticalExtentlngHE=objScrollView.HorizontalExtentlngVEM=objScrollView.VerticalExtentMaxlngHEM=objScrollView.HorizontalExtentMax
'Forzoomedchart,displaylowerleftcornerofvirtualplotareain'thelowerleftcornerofthevisibleplotarea.If(lngVE<>lngVEM)Or(lngHE<>lngHEM)ThenobjScrollView.SetPosition0,objScrollView.VerticalPosition+(lngVEM-lngVE)EndIf
![Page 679: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/679.jpg)
ShowAll
![Page 680: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/680.jpg)
SetPresetGradientMethod
FillsthespecifiedChInteriorobjectwithapresetgradientstyle.
expression.SetPresetGradient(GradientStyle,gradientVarient,gradientPreset)
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
GradientStyleRequiredChartGradientStyleEnum.Thegradientstyle.
gradientVarientRequiredChartGradientVariantEnum.Thegradientvariant.
gradientPresetRequiredChartPresetGradientTypeEnum.Thegradientstyleusedtofillthespecifiedobject.
![Page 681: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/681.jpg)
ExampleThisexamplesetstheinteriorfillofthefirsttwoseriesandtheplotareaofthefirstchartinChartSpace1.
SubFormat_Interior_Colors()
DimchConstantsDimserSeries1DimserSeries2
SetchConstants=ChartSpace1.Constants
SetserSeries1=ChartSpace1.Charts(0).SeriesCollection(0)SetserSeries2=ChartSpace1.Charts(0).SeriesCollection(1)
'Settheinteriorfillofthefirstseriestoaone-colorgradient.serSeries1.Interior.SetOneColorGradientchConstants.chGradientDiagonalDown,_chConstants.chGradientVariantCenter,0.2,"Blue"
'Settheinteriorfillofthesecondseriestoapresetgradient.serSeries2.Interior.SetPresetGradientchConstants.chGradientFromCenter,_chConstants.chGradientVariantEnd,chConstants.chGradientDaybreak
'Settheinteriorfilloftheplotareatoapattern.ChartSpace1.Charts(0).PlotArea.Interior.SetPatternedchConstants.chPattern10Percent,_"Yellow","Blue"
EndSub
![Page 682: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/682.jpg)
SetRootRecordsetMethod
SetstherootrecordsetforthespecifiedDataSourceControlobject.Usethismethodtochangetherecordsettowhichadataaccesspageisbound.
expression.SetRootRecordset(RecordsetName,Recordset)
expressionRequired.AnexpressionthatreturnsaDataSourceControlobject.
RecordsetNameRequiredString.Thenametouseforthenewrecordset.IftheDataSourcecontrolcontainsarecordsetofthisname,itwillbereplaced.
RecordsetRequiredRecordsetobject.TheADOrecordset.
![Page 683: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/683.jpg)
RemarksThismethodsupportsconnectingtoanyADOrecordset.
![Page 684: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/684.jpg)
ExampleThisexamplechangestherootrecordsetusedbythedatasourcecontrol.
SubChangeRootRecordset()DimrstCategoriesDimstrShapeTextDimstrConnectionString
strShapeText=MSODSC.RootRecordsetDefs(0).ShapeText
strConnectionString="Provider=MSDataShape.1;PersistSecurityInfo=True;DataSource"&"=sqlsvr;IntegratedSecurity=SSPI;InitialCatalog=Northwind;"&"DataProvider=SQLOLEDB.1"
SetrstCategories=CreateObject("ADODB.Recordset")
rstCategories.OpenstrShapeText,strConnectionString,1,3
MSODSC.SetRootRecordset"Categories",rstCategories
EndSub
![Page 685: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/685.jpg)
SetSolidMethod
FillsthespecifiedChInteriorobjectwithasolidcolor.Usethismethodtoconvertagradient,textured,patterned,orbackgroundfillbacktoasolidfill.
expression.SetSolid(Color)
expressionRequired.AnexpressionthatreturnsaChInteriorobject.
ColorOptionalVariant.ThecolorforthespecifiedChInteriorobject.YoucanuseeitheraLongvaluerepresentingared-green-bluecolorvalueoraStringvaluenamingavalidHTMLcolorvalue.InMicrosoftVisualBasic,youcanusetheRGBfunctiontocreateared-green-bluecolorvalue(forexample,redisRGB(255,0,0)).
![Page 686: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/686.jpg)
ExampleThisexamplesetstheinteriorfillofthefirsttwoseriesandtheplotareaofthefirstchartinChartSpace1.
SubFormat_Interior_Fills()
DimchConstantsDimserSeries1DimserSeries2
SetchConstants=ChartSpace1.Constants
SetserSeries1=ChartSpace1.Charts(0).SeriesCollection(0)SetserSeries2=ChartSpace1.Charts(0).SeriesCollection(1)
'Settheinteriorfillofthefirstseriestoatwo-colorgradient.serSeries1.Interior.SetTwoColorGradientchConstants.chGradientDiagonalDown,_chConstants.chGradientVariantCenter,"Blue","Silver"
'Settheinteriorfillofthesecondseriestoasolidcolor.serSeries2.Interior.SetSolid"Purple"
'Settheinteriorfilloftheplotareatoapresettexture.ChartSpace1.Charts(0).PlotArea.Interior.SetTextured_chConstants.chTextureParchment,chConstants.chTile
EndSub
![Page 687: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/687.jpg)
SetSpreadsheetDataMethod
BindsthespecifiedchartorchartspacetoarangeofcellsononaworksheetintheSpreadsheetComponent.ThechartmustalreadybeboundtoarangeofcellsintheSpreadsheetComponentbeforeyoucallthismethod.
expression.SetSpreadsheetData(DataReference,SeriesByRows)
expressionRequired.AnexpressionthatreturnsaChartSpaceorChChartobject.
DataReferenceRequiredString.Areferencetotherangeofcellstobindto.Thiscanbeintheformofacellreference(A1:D5),oradefinedname.
SeriesByRowsOptionalBoolean.Specifieswhetherornoteachrowrepresentsadataseries.SetthispropertytoFalseifeachcolumnrepresentsadataseries.
![Page 688: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/688.jpg)
ExampleThisexamplebindsChartSpace1tocellsA1:F25inthefirstsheetofSpreadsheet1.
ChartSpace1.SetSpreadsheetData"Sheet1!A1:F25",False
![Page 689: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/689.jpg)
ShowAll
![Page 690: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/690.jpg)
SetTexturedMethod
FillsthespecifiedChInteriorobjectwithanimageorapresettexture.
expression.SetTextured(textureFile,TextureFormat,stackUnit,TexturePlacement)
expressionRequired.AnexpressionthatreturnsaChInteriorobject.
textureFileRequiredVariant.Theimageusedtofilltheinterioroftheobject.YoucanspecifyaURLthatpointstoanimagefileoraChartPresetTextureEnumconstant.
TextureFormatOptionalChartTextureFormatEnum.DetermineshowthepictureisdisplayedwithinthespecifiedChInteriorobject.
stackUnitOptionalDouble.SpecifieshowthepictureisstackedandscaledwhentheTextureFormatargumentissettochStackScale.
TexturePlacementOptionalChartTexturePlacementEnum.AffectswherethepictureisdisplayedwithinthespecifiedChInteriorobject.Thissettingonlyaffects3-Dcharts.
![Page 691: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/691.jpg)
ExampleThisexamplesetstheinteriorfillofthefirsttwoseriesandtheplotareaofthefirstchartinChartSpace1.
SubFormat_Interior_Fills()
DimchConstantsDimserSeries1DimserSeries2
SetchConstants=ChartSpace1.Constants
SetserSeries1=ChartSpace1.Charts(0).SeriesCollection(0)SetserSeries2=ChartSpace1.Charts(0).SeriesCollection(1)
'Settheinteriorfillofthefirstseriestoatwo-colorgradient.serSeries1.Interior.SetTwoColorGradientchConstants.chGradientDiagonalDown,_chConstants.chGradientVariantCenter,"Blue","Silver"
'Settheinteriorfillofthesecondseriestoasolidcolor.serSeries2.Interior.SetSolid"Purple"
'Settheinteriorfilloftheplotareatoapresettexture.ChartSpace1.Charts(0).PlotArea.Interior.SetTextured_chConstants.chTextureParchment,chConstants.chTile
EndSub
![Page 692: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/692.jpg)
ShowAll
![Page 693: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/693.jpg)
SetTwoColorGradientMethod
FillsthespecifiedChInteriorobjectwithatwo-colorgradient.
expression.SetTwoColorGradient(GradientStyle,GradientVariant,Color,BackColor)
expressionRequired.AnexpressionthatreturnsaChInteriorobject.
GradientStyleRequiredChartGradientStyleEnum.Thegradientstyle.
GradientVariantRequiredChartGradientVariantEnum.Thegradientvariant.IfGradientStyleischGradientFromCenter,theGradientVariantargumentcanonlybechGradientVariantStartorchGradientVariantEnd.
ColorOptionalVariant.Theforegroundcolorofthegradient.YoucanuseeitheraLongvaluerepresentingared-green-bluecolorvalueoraStringvaluenamingavalidHTMLcolorvalue.InMicrosoftVisualBasic,youcanusetheRGBfunctiontocreateared-green-bluecolorvalue(forexample,redisRGB(255,0,0)).Ifomitted,theColorpropertyisusedtodeterminetheforegroundcolor.
BackColorOptionalVariant.Thebackgroundcolorofthegradient.YoucanuseeitheraLongvaluerepresentingared-green-bluecolorvalueoraStringvaluenamingavalidHTMLcolorvalue.InMicrosoftVisualBasic,youcanusetheRGBfunctiontocreateared-green-bluecolorvalue(forexample,redisRGB(255,0,0)).Ifomitted,theBackColorpropertyisusedtodeterminetheforegroundcolor.
![Page 694: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/694.jpg)
ExampleThisexamplesetstheinteriorfillofthefirsttwoseriesandtheplotareaofthefirstchartinChartSpace1.
SubFormat_Interior_Fills()
DimchConstantsDimserSeries1DimserSeries2
SetchConstants=ChartSpace1.Constants
SetserSeries1=ChartSpace1.Charts(0).SeriesCollection(0)SetserSeries2=ChartSpace1.Charts(0).SeriesCollection(1)
'Settheinteriorfillofthefirstseriestoatwo-colorgradient.serSeries1.Interior.SetTwoColorGradientchConstants.chGradientDiagonalDown,_chConstants.chGradientVariantCenter,"Blue","Silver"
'Settheinteriorfillofthesecondseriestoasolidcolor.serSeries2.Interior.SetSolid"Purple"
'Settheinteriorfilloftheplotareatoapresettexture.ChartSpace1.Charts(0).PlotArea.Interior.SetTextured_chConstants.chTextureParchment,chConstants.chTile
EndSub
![Page 695: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/695.jpg)
ShowMethod
Scrollsthespreadsheetwindowtomovethespecifiedrangeintoview.
expression.Show
expressionAnexpressionthatreturnsaRangeobject.
![Page 696: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/696.jpg)
RemarksIfyouspecifyarangethatisnotontheactiveworksheet,thismethodwillnotactivatethatworksheet.However,thespecifiedrangewillbevisiblewhenyouactivatethatworksheet.Forexample,ifSheet1iscurrentlyactiveandyouusethismethodwithcellA500onSheet2,Sheet1remainsactive.CellA500willbeactiveifyouimmediatelyactivateSheet2,eithermanuallyorbyusingtheActivatemethodoftheWorksheetobject.
![Page 697: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/697.jpg)
ExampleThisexamplescrollsthespreadsheetuntilcellP75isvisible.
Spreadsheet1.ActiveSheet.Range("p75").Show
![Page 698: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/698.jpg)
ShowAboutMethod
DisplaystheAboutMicrosoftOfficeWebComponentsdialogbox.
expression.ShowAbout
expressionRequired.AnexpressionthatreturnsaSpreadsheetorPivotTableobject.
![Page 699: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/699.jpg)
ShowAllDataMethod
MakesallfilteredrowsvisibleonthespecifiedworksheetandsetsallfilterstoShowAll.
expression.ShowAllData
expressionAnexpressionthatreturnsaWorksheetobject.
![Page 700: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/700.jpg)
ExampleThisexamplemakesallfilteredrowsvisibleontheactiveworksheetandsetsallfilterstoShowAll.
Spreadsheet1.ActiveSheet.ShowAllData
![Page 701: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/701.jpg)
ShowContextMenuMethod
Displaysacustomizedcontextmenuatthespecifiedscreencoordinates.
expression.ShowContextMenu(x,y,Menu)
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
xRequiredLong.Representsthex-coordinatewherethecontextmenuistoappear.
yRequiredLong.Representsthey-coordinatewherethecontextmenuistoappear.
MenuRequiredVariant.Thearraythatcontainsthemenuitemstodisplay.
![Page 702: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/702.jpg)
ExampleThisexampledisplaysacontextmenu.
SubShowMenu()
DimcmContextMenu(4)DimcmClearSubMenu(2)
cmClearSubMenu(0)=Array("&All","ClearAll")cmClearSubMenu(1)=Array("&Formats","ClearFormats")cmClearSubMenu(2)=Array("&Values","ClearValues")
cmContextMenu(0)=Array("Cu&t","owc2")cmContextMenu(1)=Array("&Copy","owc3")cmContextMenu(2)=Array("&Paste","owc4")cmContextMenu(3)=EmptycmContextMenu(4)=Array("Clea&r",cmClearSubMenu)
Spreadsheet1.ShowContextMenu10,40,cmContextMenu
EndSub
![Page 703: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/703.jpg)
ShowDetailsMethod
Expandsthedetailscellsforthespecifiedobject.IfthespecifiedobjectisaPivotDataobject,alldetailcellsareexpanded.IfthespecifiedobjectisaPivotRowMemberobject,thenalldetailscellsinthatrowareexpanded.IfthespecifiedobjectisaPivotColumnMemberobject,thenalldetailscellsinthatcolumnareexpanded.
expression.ShowDetails
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 704: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/704.jpg)
ExampleThisexampleexpandsallofthedetailcellsinPivotTable1.
PivotTable1.ActiveData.ShowDetails
![Page 705: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/705.jpg)
ShowAll
![Page 706: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/706.jpg)
ShowHelpMethod
ShowHelpmethodasitappliestotheChartSpaceobject.
ShowHelpmethodasitappliestothePivotTableandSpreadsheetobjects.
![Page 707: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/707.jpg)
SmallScrollMethod
Scrollsthecontentsofthewindowbyrowsorcolumns.
expression.SmallScroll(Down,Up,ToRight,ToLeft)
expressionRequired.AnexpressionthatreturnsaWindowobject.
DownOptionalVariant.Thenumberofrowstoscrollthecontentsdown.
UpOptionalVariant.Thenumberofrowstoscrollthecontentsup.
ToRightOptionalVariant.Thenumberofcolumnstoscrollthecontentstotheright.
ToLeftOptionalVariant.Thenumberofcolumnstoscrollthecontentstotheleft.
![Page 708: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/708.jpg)
RemarksIfDownandUporToLeftandToRightarebothspecified,thecontentsofthewindowarescrolledbythedifferenceofthearguments.Forexample,ifDownis3andUpis6,thethecontentsarescrolledupthreerows.
Anyoftheseargumentscanbeanegativenumber.
![Page 709: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/709.jpg)
ExampleThisexamplescrollsthecontentsoftheactivewindowofSpreadsheet1downthreerows.
Spreadsheet1.ActiveWindow.SmallScroll3
![Page 710: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/710.jpg)
ShowAll
![Page 711: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/711.jpg)
SortMethod
Sortsarangeor,ifthespecifiedrangecontainsonlyonecell,thecurrentregion
expression.Sort(ColumnKey,Order,Header)
expressionAnexpressionthatreturnsaRangeobject.
ColumnKeyOptionalLong.Thenumberofthefirstsortcolumn.Thedefaultvalueis1.
OrderOptionalXlSortOrder.Thesortorder.
HeaderOptionalXlYesNoGuess.Determineswhetherthefirstrowcontainsheaders.
![Page 712: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/712.jpg)
ExampleThisexamplesortstherangeA1:F10indescendingorderbasedoncolumnB.
SubSortData()DimssConstants
SetssConstants=Spreadsheet1.Constants
'SortRangeA1:F10oncolumnBindescendingorderandspecifythat'row1containsheadings.Spreadsheet1.ActiveSheetRange("A1:F10").Sort2,_ssConstants.xlDescending,ssConstants.xlYesEndSub
![Page 713: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/713.jpg)
SortAscendingMethod
Sortsafieldonadataaccesspageinascendingorder.
expression.SortAscending
expressionRequired.AnexpressionthatreturnsaDataPageobject.
![Page 714: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/714.jpg)
RemarksThismethodreliesuponthecurrentselectiononthedataaccesspagetodeterminethefieldtosortby.Therefore,youmustsetthefocustothefieldtosortby,whentheprocedurecontainingthismethodisinvokedbyacontrolonthedataaccesspage,suchasacommandbutton.
![Page 715: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/715.jpg)
ExampleThisexamplesortstheProductNamefieldinascendingorder.
SubSortProductNameAscending()
'SetfocustothecontrolfortheProductNamefield.MSODSC.Datapages(0).FirstSection.HTMLContainer.Children("ProductName").Focus
'Sortthefieldindescendingorder.MSODSC.DataPages(0).SortAscending
EndSub
![Page 716: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/716.jpg)
SortDescendingMethod
Sortsafieldonadataaccesspageindescendingorder.
expression.SortDescending
expressionRequired.AnexpressionthatreturnsaDataPageobject.
![Page 717: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/717.jpg)
RemarksThismethodreliesuponthecurrentselectiononthedataaccesspagetodeterminethefieldtosortby.Therefore,youmustsetthefocustothefieldtosortby,whentheprocedurecontainingthismethodisinvokedbyacontrolonthedataaccesspage,suchasacommandbutton.
![Page 718: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/718.jpg)
ExampleThisexamplesortstheProductNamefieldindescendingorder.
SubSortProductNameDescending()
'SetfocustothecontrolfortheProductNamefield.MSODSC.Datapages(0).FirstSection.HTMLContainer.Children("ProductName").Focus
'Sortthefieldindescendingorder.MSODSC.DataPages(0).SortDescending
EndSub
![Page 719: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/719.jpg)
ShowAll
![Page 720: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/720.jpg)
StartEditMethod
Placestheactivedetailcellintoeditmode.
expression.StartEdit(InitialValue,ArrowMode,CaretPosition)
expressionRequired.AnexpressionthatreturnsoneoftheaPivotTableobject.
InitialValueOptionalVariant.Specifiestheinitialvaluetousewheneditingthecell.Thecurrentvalueisusedifyoudonotspecifyavalueforthisargument.
ArrowModeOptionalPivotArrowModeEnum.Specifieshowtheleftandrightarrowsfunctionwhiletheuserisineditmode.
CaretPositionOptionalPivotCaretPositionEnum.Specifiesthepositionoftheinsertionpointwithinthecell.
![Page 721: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/721.jpg)
RemarksThismethodwillresultinarun-timeerrorifthecurrentselectionisnotadetailcell,orifthecurrentdataisnoteditable.
![Page 722: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/722.jpg)
TextHeightMethod
CalculatesandreturnsaVariantthatrepresentsthewidthofthespecifiedtextinpixels,basedonthecurrentfontsetting.
expression.TextHeight(Text)
expressionRequired.AnexpressionthatreturnsaChChartDrawobject.
TextRequiredString.Thetextwhosesizeyouwanttocalculate.
![Page 723: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/723.jpg)
TextWidthMethod
CalculatesandreturnsaVariantthatrepresentsthewidthofthespecifiedtextinpixels,basedonthecurrentfontsetting.
expression.TextWidth(Text)
expressionRequired.AnexpressionthatreturnsaChChartDrawobject.
TextRequiredString.Thetextwhosesizeyouwanttocalculate.
![Page 724: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/724.jpg)
ToggleFilterMethod
Togglesthestateofthecurrentfilterthathasbeenappliedtothedataaccesspage.Ifthefilterisactive,callingthismethoddeactivatesthefilter.Callingthismethodasecondtimereappliesthefilter.
expression.ToggleFilter
expressionRequired.AnexpressionthatreturnsaDataPageobject.
![Page 725: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/725.jpg)
ExampleThisexampletogglesthefilteronthefirstdataaccesspageinthedatasourcecontrolnamedMSODSC.
MSODSC.DataPages(0).ToggleFilter
![Page 726: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/726.jpg)
UndoMethod
FortheChartSpaceandSpreadsheetobjects,undoesthelastsingleactionorthelastmacroblocksurroundedbyBeginUndoandEndUndomethodcalls.
FortheDataPageobject,restoresthedataaccesspagetotheconditionbeforetherecordsetwaseditediftheeditshavenotbeensaved.
expression.Undo
expressionAnexpressionthatreturnsaChartSpace,DataPage,orSpreadsheetobject.
![Page 727: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/727.jpg)
ExampleThisexampleundoesthelastactionordisplaysamessageboxifthisactioncannotbeundone.
IfSpreadsheet1.CanUndoThenSpreadsheet1.UndoElseMsgBox"can'tundolastaction"EndIf
![Page 728: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/728.jpg)
UngroupMethod
Movesthespecifiedseriesintoanewlayer.
expression.Ungroup(UseNewScaling)
expressionRequired.AnexpressionthatreturnsaChSeriesobject.
UseNewScalingOptionalBoolean.SetthisargumenttoTruetospecifythattheseriesusesadifferentscalingthanthepreviouslayer.ThedefaultvalueisFalse.
![Page 729: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/729.jpg)
RemarksWhenyoumoveaseriesintoanewlayer,youcanassigntheseriestoanaxisthatisbasedonadifferentvaluescale.
![Page 730: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/730.jpg)
ExampleThisexamplecreatesacombinationchartbasedonliteraldata.Thefirstdataseriesisplottedasaline.Theseconddataseriesisplottedascolumns,andonait'sownvalueaxis.
SubWindow_Onload()
DimasSeriesNames(1)DimasCategories(3)DimaiSeries1(3)DimalSeries2(3)DimchConstantsDimchtNewChartDimserUnitSalesDimserDispIncDimaxIncomeAxis
asSeriesNames(0)="UnitSales"asSeriesNames(1)="DisposableIncome"
asCategories(0)="Item1"asCategories(1)="Item2"asCategories(2)="Item3"asCategories(3)="Item4"
aiSeries1(0)=75aiSeries1(1)=84aiSeries1(2)=30aiSeries1(3)=94
alSeries2(0)=14522
![Page 731: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/731.jpg)
alSeries2(1)=17321alSeries2(2)=9424alSeries2(3)=41782
SetchConstants=ChartSpace1.Constants
'Enagblethedisplayofthelegend.ChartSpace1.HasChartSpaceLegend=True
'AddanewcharttoChartspace1.SetchtNewChart=ChartSpace1.Charts.Add
'Specifythatthechartisacolumnchart.chtNewChart.Type=chConstants.chChartTypeLineMarkers
'Bindthecharttothearrays.chtNewChart.SetDatachConstants.chDimSeriesNames,chConstants.chDataLiteral,asSeriesNameschtNewChart.SetDatachConstants.chDimCategories,chConstants.chDataLiteral,asCategories
SetserUnitSales=chtNewChart.SeriesCollection(0)
serUnitSales.SetDatachConstants.chDimValues,chConstants.chDataLiteral,aiSeries1
SetserDispInc=chtNewChart.SeriesCollection(1)
serDispInc.SetDatachConstants.chDimValues,chConstants.chDataLiteral,alSeries2
'Ungrouptheseries.serDispInc.UngroupTrue
'Addanewvalueaxistothechartbasedonthevaluesintheseries.SetaxIncomeAxis=chtNewChart.Axes.Add(serDispInc.Scalings(chConstants.chDimValues))
![Page 732: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/732.jpg)
'Placetheaxisontherightsideofthechart.axIncomeAxis.Position=chConstants.chAxisPositionRight
'Displaytheseriesascolumns.serDispInc.Type=chConstants.chChartTypeColumnClustered
EndSub
![Page 733: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/733.jpg)
UnMergeMethod
Separatesthespecifiedmergedareaintoindividualcells.Whenyouseparateamergedarea,thevalueinthemergedareaisplacedinthecellintheupper-leftcornerofthearea.Allothercellsarecleared.
expression.UnMerge
expressionAnexpressionthatreturnsaRangeobject.
![Page 734: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/734.jpg)
ExampleThisexampleseparatesthemergedareacontainingcellA1.
Spreadsheet1.ActiveSheet.Range("A1").UnMerge
![Page 735: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/735.jpg)
UnprotectMethod
Removesprotectionfromaworksheetorworkbook.Thismethodhasnoeffectiftheworksheetorworkbookisn'tprotected.ThismethodisequivalenttosettingtheEnabledpropertyoftheProtectionobjecttoFalse.
expression.Unprotect(Password)
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
PasswordThisargumentisnotsupportedinthisversionoftheMicrosoftOfficeSpreadsheetComponent.
![Page 736: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/736.jpg)
UpdateMethod
YouusetheUpdatemethodtowritedatacontainedinanXMLmaptoadatasourceboundtoaSOAPWebservice.ReturnsNothing.
expression.Update(ShowDialogs)
expressionRequired.AnexpressionthatreturnsanXmlDataBindingobject.
ShowDialogsOptionalBoolean.SpecifieswhetheradialogboxisdisplayediftheUpdatemethodencountersanerrorthatisreturnedbytheSpreadsheetcomponentitself.WhenShowDialogsissettoTrue,adialogboxisdisplayediftheUpdatemethodencountersanerrorreturnedbytheSpreadsheetcomponent.WhenShowDialogsissettoFalse,dialogboxesforSpreadsheetcomponenterrorsarenotdisplayed.ThedefaultisFalse.
NoteTheShowDialogsargumentdoesnotcontrolwhetheradialogboxwillbedisplayedforerrorsexternaltotheSpreadsheetcomponent,suchaserrorsreturnedbyscriptingcomponents.TopreventadialogboxfromdisplayingforerrorsexternaltotheSpreadsheetcomponent,youmusttrapthoseerrorsinyourscript.
![Page 737: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/737.jpg)
Remarks
IftheUpdatemethodfails,theBindingErroreventoftheSpreadsheetcomponentwillfire,andanyscriptingerrorswillbereturned.TocatchanupdateerroryoumustaddcodetotheBindingErrorevent,ortraperrorsinscript.Duringasynchronousbinding,anyefforttoworkwithanXmlDataBindingobjectprogrammaticallywillfail.YoucanusetheAsyncpropertyoftheXmlDataBindingobjecttodetermineifabindingsupportsasynchronousbinding.YouusetheBindingInProgresspropertyoftheXmlDataBindingobjecttodetermineofanasynchronousbindingisinprogress.
![Page 738: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/738.jpg)
ExampleYoucanaddcodetotheBindingCompletedeventoftheSpreadsheetcomponentthatcallstheUpdatemethodoryoucanusetheBindingInProgresspropertytodetermineifdatabindingisinprogress.ThefollowingexampleusestheUpdatemethodtowritedatabacktothedatasourceofaSOAPWebserviceforallXmlDataBindingobjectsinaSpreadsheetcomponent:
SubUpdateBinding(Spreadsheet1)
Spreadsheet1.ActiveWorkbook.XmlDataBindings.Item(2).Update
EndSub
SubSpreadsheet1_BindingCompleted(bindingID,Action)
IfSpreadsheet1.ActiveWorkbook.XmlDataBindings.Item(bindingID).CanUpdate=TrueThen'Writecodeheretoperformanyadditionalactionsonthisupdatebinding.EndIf
EndSub
NoteForinformationontrappingtheBindingCompletedeventfromscriptrunninginaWebpage,seetheBindingCompletedeventtopic.
![Page 739: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/739.jpg)
UpdatePropertyToolboxMethod
UpdatestheCommandsandOptionswindowfromthecurrentlyselectedobject.
expression.UpdatePropertyToolbox
expressionAnexpressionthatreturnsaSpreadsheetobject.
![Page 740: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/740.jpg)
ValidateMethod
YouusetheValidatemethodtovalidatedatainacellorrangeofcellsintheSpreadsheetcomponent.ReturnsNothing.
expression.Validate
expressionRequired.AnexpressionthatreturnsaRangeobject.
![Page 741: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/741.jpg)
Remarks
TheeasiestwaytocreateoneormoredatavalidationrulesforcellsinaSpreadsheetcomponentistouseMicrosoftExcel.YoucanuseExceltocreateanewspreadsheet,oropenanexistingspreadsheet,andthenusetheExceldatavalidationfeaturestocreatedatavalidationrules.YousavethespreadsheetasanXMLSpreadsheetfileandthensettheSpreadsheetcomponent'sXmlUrlpropertytothesavedfile.ValidationrulescreatedintheXMLSpreadsheetfiletriggervalidationruleerrormessagesonlywhendataisenteredthroughtheuserinterface.Forexample,whenauserentersdataintoacellthatviolatesavalidationrule,avalidationruleerrormessageisdisplayedtotheuser.However,ifdataisenteredintoacellprogrammatically,oriftheImportXmlmethodisusedtoimportanewXMLdatafileintotheSpreadsheetcomponentthatcontainsinvaliddata,noerrormessagesaretriggered.Inthiscircumstance,youcanusetheValidatemethodtodeterminewhethersuchdataisvalid.
TheValidatemethoddoesnotreturnavalueindicatingthatacellorrangeofcellscontainsinvaliddata.IfyouareusingMicrosoftVisualBasicScriptingEdition(VBScript)tovalidatedata,youmustusetheOnErrorResumeNextstatementonthelineimmediatelyprecedingthecalltotheValidatemethod.InthelineimmediatelyafterthecalltotheValidatemethod,usetheNumberpropertyoftheVBScriptErrobjecttotestwhethervalidationsucceeded.
![Page 742: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/742.jpg)
ExampleThefollowingexampleillustratesafunctionthatreturnsTrueifthedatainacellisvalidandFalseifnotitisnotvalid.
DimobjRangeSpreadsheet1.xmlurl="MyXmlSpreadsheetFile.xml"SetobjRange=Spreadsheet1.Workbooks(1).ListObject("EntryID").DataBodyRange
IfValidateRange(objRange)=TrueThen'Validationsucceeded.Else'Validationfailed.EndIf
FunctionValidateRange(objRange)DimlngErrorOnErrorResumeNextobjRange.Validate()lngError=Err.NumberIflngError<>0ThenValidateRange=TrueExitFunctionEndIfValidateRange=FalseEndFunction
ThenextexampleaddsdatatoacellandthenusestheValidatemethodtodeterminewhetherthedatasatisfiesthecell'svalidationrule:
DimobjRange
![Page 743: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/743.jpg)
SetobjRange=Spreadsheet1.ActiveCell
objRange.Value=100OnErrorResumeNext
objRange.Validate
IfErr.Number<>0thenobjRange.Value=""EndIf
![Page 744: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/744.jpg)
ShowAll
![Page 745: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/745.jpg)
ValueToPointMethod
ValueToPointmethodasitappliestotheChAxisobject.
ValueToPointmethodasitappliestotheChSeriesobject.
![Page 746: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/746.jpg)
RemarksUsethexandypropertiesofthereturnedCoordinateobjecttoreturntheXandY-coordinatesforthespecifieddatapoint.
![Page 747: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/747.jpg)
ExampleAsitappliestotheChSeriesobject.
![Page 748: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/748.jpg)
ActiveProperty
ReturnsTrueiftherowrepresentedbytheListRowobjectisselected.Read/writeBoolean.
expression.Active
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
Remarks
SettingtheActivepropertyofaListRowobjectequaltoTrueisnotreflectedintheRangeobjectreturnedbytheSelectionproperty.Toaddarowtoaselectedrange,youmustusetheSelectmethodinstead.
![Page 749: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/749.jpg)
ExampleThisexamplecheckswhetherthespecifiedrowintheXMLlistisselected.
SubIsRowActive()
DimobjListsDimobjLRowsDimobjLRow
SetobjLists=Spreadsheet1.ActiveSheet.ListObjectsSetobjLRows=objLists.Item(1).ListRows'Savelistrowinformationforthethirdrowtoavariable.SetobjLRow=objLRows.Item(3)
'Displaywhetherthecurrentrowisselected.IfobjLRow.ActiveThenMsgBox("Rowisselected.")ElseMsgBox("Rowisnotselected.")EndIf
EndSub
![Page 750: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/750.jpg)
ActiveCellProperty
ReturnsaRangeobjectthatrepresentstheactivecell.Read-only.
expression.ActiveCell
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
Remarks
Becarefultodistinguishbetweentheactivecellandtheselection.Theactivecellisasinglecellinsidethecurrentselection.Theselectionmaycontainmorethanonecell,butonlyoneistheactivecell.
![Page 751: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/751.jpg)
ExampleThisexamplesetsthenumberformatintheactivecellontheworksheet.
Spreadsheet1.ActiveCell.NumberFormat="0.##"
![Page 752: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/752.jpg)
ActiveDataProperty
ReturnsaPivotDataobjectthatrepresentsthedataintheactivePivotTablelist.
expression.ActiveData
expressionRequired.AnexpressionthatreturnsaPivotTableobject.
![Page 753: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/753.jpg)
ActiveObjectProperty
ReturnsorsetsanObjectthatrepresentstheselectedcellinthedetailareaofthePivotTablelist.UsetheValuepropertyofthereturnedobjecttochangethevalueoftheselectedcell.
expression.ActiveObject
expressionRequired.AnexpressionthatreturnsaPivotTableobject.
![Page 754: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/754.jpg)
RemarksThispropertyreturnsNothingifnodetailcellsareselected.
![Page 755: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/755.jpg)
ExampleThisexampleenablestheeditingofdetailrecordsinPivotTable1,thenplacesthecurrentdateintheselecteddetailcell.Theeditingofdetailrecordsisdisallowedoncethedatehasbeeninsertedintotheselectedcell.
SubEditSelectedCell()
DimobjActiveCell
'Alloweditingofdetailrecords.PivotTable1.ActiveView.AllowEdits=True
'Setavariabletothecurrentlyselectedcell.SetobjActiveCell=PivotTable1.ActiveObject
'Checkwhetheradetailcellisselected.IfNotobjActiveCellIsNothingThen
'Setthevalueofthedetailcell'tothecurrentdate.'Note:Thiswillresultinarun-time'errorifthedatatypeoftheselected'celldoesnotsupportdatevalues.objActiveCell.Value=Date
EndIf
'Disalloweditingofdetailrecords.PivotTable1.ActiveView.AllowEdits=False
EndSub
![Page 756: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/756.jpg)
![Page 757: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/757.jpg)
ActivePaneProperty
ReturnsaPaneobjectthatrepresentstheactivespreadsheetpane.Read-only.
expression.ActivePane
expressionRequired.AnexpressionthatreturnsaWindowobject.
![Page 758: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/758.jpg)
ExampleThisexamplesetsthevalueofthecellintheupper-leftcornerofthevisiblerangeintheactivepaneonthespreadsheet.
Spreadsheet1.ActivePane.VisibleRange.Cells(1,1).Value="topleft"
![Page 759: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/759.jpg)
ActiveSheetProperty
Returnsaread-onlyWorksheetobjectthatrepresentstheactiveworksheet.
expression.ActiveSheet
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 760: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/760.jpg)
ExampleThisexamplechangesthenameoftheactiveworksheet.
Spreadsheet1.ActiveSheet.Name="BudgetSheet"
![Page 761: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/761.jpg)
ActiveViewProperty
ReturnsaPivotViewobjectthatrepresentsthelayoutoftheactivePivotTablelist.SettingavariabletotheactiveviewofthePivotTableprovidesyouwithaconvenientmethodtomakechangestotheactiveview.Read-only.
expression.Case
expressionRequired.AnexpressionthatreturnsaPivotTableobject.
![Page 762: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/762.jpg)
ExampleThisexampleinsertstwofieldsetsintheactiveviewofPivotTable1.
SubInsert_Fieldsets()DimvwView
SetvwView=PivotTable1.ActiveView'AddtheStoreTypefieldtothecolumnaxis.vwView.ColumnAxis.InsertFieldSetvwView.FieldSets("StoreType")'AddthePromotionsfieldtotherowaxis.vwView.RowAxis.InsertFieldSetvwView.FieldSets("Promotions")EndSub
![Page 763: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/763.jpg)
ActiveWindowProperty
ReturnsaWindowobjectthatrepresentsthecurrentwindow.
expression.ActiveWindow
expressionRequired.AnexpressionthatreturnsaSpreadsheetobject.
![Page 764: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/764.jpg)
ExampleThisexamplehidestherowandcolumnheadingsintheactivewindowofSpreadsheet1.
SubHideHeadings()Spreadsheet1.ActiveWindow.DisplayColumnHeadings=FalseSpreadsheet1.ActiveWindow.DisplayRowHeadings=FalseEndSub
![Page 765: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/765.jpg)
ActiveWorkbookProperty
ReturnsaWorkbookobjectthatrepresentstheopenworkbook.
expression.ActiveWorkbook
expressionRequired.AnexpressionthatreturnsaSpreadsheetobject.
![Page 766: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/766.jpg)
ExampleThisexampleprotectsthestructureoftheopenworkbookinSpreadsheet1.
Speadsheet1.ActiveWorkbook.Protect,True
![Page 767: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/767.jpg)
ShowAll
![Page 768: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/768.jpg)
AddressProperty
AddresspropertyasitappliestotheHyperlinkandPivotHyperlinkobjects.
AddresspropertyasitappliestotheRangeobject.
![Page 769: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/769.jpg)
ExampleAsitappliestotheHyperlinkobject.
AsitappliestotheRangeobject.
![Page 770: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/770.jpg)
AggregatesProperty
ReturnsthePivotAggregatescollectionforthespecifiedcell.
expression.Aggregates
expressionRequired.AnexpressionthatreturnsaPivotCellobject.
![Page 771: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/771.jpg)
RemarksForinformationaboutreturningasinglememberofacollection,seeReturninganObjectfromaCollection.
![Page 772: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/772.jpg)
AllGroupingDefsProperty
ReturnstheAllGroupingDefscollectionforthedatasourcecontrol.Read-only.
expression.AllGroupingDefs
expressionRequired.AnexpressionthatreturnsaDataSourceControlobject.
![Page 773: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/773.jpg)
ShowAll
![Page 774: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/774.jpg)
AllIncludeExcludeProperty
ReturnsorsetsaPivotFieldSetAllIncludeExcludeEnumthatrepresentstheinclusionstateofallmembersthatarenotlistedintheIncludedMembersorExcludedMemberslistsforthespecifiedfieldset.Read/write.
expression.AllIncludeExclude
expressionRequired.AnexpressionthatreturnsaPivotFieldSetobject.
![Page 775: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/775.jpg)
ExampleThisexamplesetstheincludedandexcludedmembersoftheStoreStateandStoreCityfieldsinPivotTable1.Membersnotlistedintheincludeandexcludelistsareexcluded.
SubMemberFiltering()
DimfldStoreCityDimfldStoreStateDimptViewDimptConstants
SetptConstants=PivotTable1.Constants
'SetavariabletothecurrentPivotTableview.SetptView=PivotTable1.ActiveView
'SetavariabletotheStoreStatefield.SetfldStoreState=ptView.FieldSets("Store").Fields("StoreState")
'SetavariabletotheStoreCityfield.SetfldStoreCity=ptView.FieldSets("Store").Fields("StoreCity")
'ExcludeCaliforniaandWashingtonfromtheStoreStatefield.fldStoreState.ExcludedMembers=Array("CA","WA")
'IncludemembersoftheStoreCityfield.Notethatthecitiesare'instatesthathavebeenexcludedbythepreviousline.Since'StoreStateisaparenttoStoreCity,thentheexcludedstates'aredisplayedinthePivotTable.fldStoreCity.IncludedMembers=Array("LosAngeles","SanDiego",_
![Page 776: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/776.jpg)
"Seattle","Spokane")
'ExcludeallmembersthatarenotinthelistfortheIncludedMembersand'ExcludedMembersproperties.ptView.FieldSets("Store").AllIncludeExclude=ptConstants.plAllExclude
EndSub
![Page 777: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/777.jpg)
AllMemberProperty
ReturnsaPivotMemberobjectthatrepresentsthetopmemberinthespecifiedfieldset.
expression.AllMember
expressionRequired.AnexpressionthatreturnsPivotFieldSetobject.
![Page 778: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/778.jpg)
AllowAdditionsProperty
GroupLevelobject:ReturnsorsetsaBooleanthatrepresentswhethertheusercanaddrecordstothespecifiedgroup.SetthispropertytoFalsetopreventusersfromaddingrecordstoagroup.ThedefaultvalueisTrue.Read/write.
PivotViewobject:ReturnsorsetsaBooleanthatrepresentswhethertheusercanaddanewrecordtothedetailareaofaPivotTablelist.SetthispropertytoTruetoallowtheusertoinsertnewrecords.ThedefaultvalueifFalse.Read/write.
expression.AllowAdditions
expressionRequired.AnexpressionthatreturnsaGroupLevelorPivotViewobject.
![Page 779: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/779.jpg)
RemarksWhenthispropertyissettoTrue,anasterisk(*)willbedisplayedinablankrowinthedetailarea.AnynewrecordsaddedtothedetailareaofaPivotTablelistarealsoaddedtothesourcedatabase.
YoucannotaddrecordstothedetailareaofthePivotTablelistifthesourcerecordsetdoesnotallowinsertions.
![Page 780: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/780.jpg)
ExampleThisexampleallowstheusertoaddnewrecordstothedetailareaofPivotTable1.
PivotTable1.ActiveView.AllowAdditions=True
![Page 781: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/781.jpg)
AllowCustomOrderingProperty
Returnsorsetswhethertheusercanreorderrowaxisorcolumnaxismembers.SetthispropertytoFalsetopreventusersfromrowaxisorcolumnaxismemberreordering.ThedefaultvalueisTrue.Read/writeBoolean.
expression.AllowCustomOrdering
expressionRequired.AnexpressionthatreturnsaPivotTableobject.
![Page 782: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/782.jpg)
ExampleThisexamplepreventsusersfromreorderingmembersoftherowaxisorcolumnaxisinPivotTable1.
PivotTable1.AllowCustomOrdering=False
![Page 783: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/783.jpg)
AllowDeletingColumnsProperty
Specifieswhetheraworksheetcolumncanbedeletedwhentheworksheethasbeenprotected.ThedefaultvalueisFalse,butthispropertyhasnoeffectiftheEnabledpropertyoftheProtectionobjectissettoFalse.Read/writeBoolean.
expression.AllowDeletingColumns
expressionRequired.AnexpressionthatreturnsaProtectionobject.
![Page 784: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/784.jpg)
ExampleThisexamplelocksallcellsonSheet1,enablestheinsertionanddeletionofcolumns,andthenprotectsSheet1.
SubProtect_Worksheet()DimptProtSheet1
'Lockallcellsontheworksheet.Spreadsheet1.Worksheets("Sheet1").Cells.Locked=TrueSetptProtSheet1=Spreadsheet1.Worksheets("Sheet1").Protection'AllowsusertodeletecolumnswhileSheet1isprotected.ptProtSheet1.AllowDeletingColumns=True'AllowsusertoinsertcolumnswhileSheet1isprotected.ptProtSheet1.AllowInsertingColumns=True'ProtectSheet1.ptProtSheet1.Enabled=TrueEndSub
![Page 785: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/785.jpg)
AllowDeletingRowsProperty
Specifieswhetheraworksheetrowcanbedeletedwhentheworksheethasbeenprotected.ThedefaultvalueisFalse,butthispropertyhasnoeffectiftheEnabledpropertyoftheProtectionobjectissettoFalse.Read/writeBoolean.
expression.AllowDeletingRows
expressionRequired.AnexpressionthatreturnsaProtectionobject.
![Page 786: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/786.jpg)
ExampleThisexamplelocksallcellsonSheet1,andthenitenablestheinsertionanddeletionofrows,andthenprotectsSheet1.
SubProtect_Worksheet()DimptProtSheet1
'Lockallcellsontheworksheet.Spreadsheet1.Worksheets("Sheet1").Cells.Locked=TrueSetptProtSheet1=Spreadsheet1.Worksheets("Sheet1").Protection'AllowsusertodeleterowswhileSheet1isprotected.ptProtSheet1.AllowDeletingRows=True'AllowsusertoinsertrowswhileSheet1isprotected.ptProtSheet1.AllowInsertingRows=True'ProtectSheet1.ptProtSheet1.Enabled=TrueEndSub
![Page 787: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/787.jpg)
AllowDeletionsProperty
GroupLevelobject:ReturnsorsetsaBooleanthatrepresentswhethertheusercandeleterecordsfromthespecifiedgroup.SetthispropertytoFalsetopreventusersfromdeletingrecordsfromagroup.ThedefaultvalueisTrue.Read/write.
PivotViewobject:ReturnsorsetsaBooleanthatrepresentswhethertheusercandeletearecordfromdetailareaofaPivotTablelist.SetthispropertytoTruetoallowtheusertodeleterecords.ThedefaultvalueisFalse.Read/write.
expression.AllowDeletions
expressionRequired.AnexpressionthatreturnsaGroupLevelorPivotViewobject.
![Page 788: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/788.jpg)
RemarksAnyrecordsthataredeletedfromthedetailareaofaPivotTablelistarealsodeletedfromthesourcedatabase.TheusercannotdeleterecordsfromthedetailareaofthePivotTablelistifthesourcerecordsetdoesnotallowdeletions.
![Page 789: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/789.jpg)
ExampleThisexampleallowstheusertodeleterecordsfromthedetailareaofPivotTable1.
PivotTable1.ActiveView.AllowDeletions=True
![Page 790: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/790.jpg)
AllowDetailsProperty
SpecifieswhethertheusercanexpandaninnermemberofthespecifiedPivotTablelisttodisplaydetailrecords.ThedefaultvalueisTrue.Read/writeBoolean.
expression.AllowDetails
expressionRequired.AnexpressionthatreturnsaPivotTableobject.
![Page 791: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/791.jpg)
RemarksWhenthispropertyisFalse,innermembersdonotdisplayexpandindicators,theExpandcommandisdisabledformostaggregates,anddouble-clickinganaggregatedoesnotdisplaydetaildata.IfthispropertyisFalse,theusercanstillviewdetailsprogrammatically.
![Page 792: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/792.jpg)
ExampleThisexampledisablesdetailviewingforthePivotTablelist.
PivotTable1.AllowDetails=False
![Page 793: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/793.jpg)
AllowEditsProperty
GroupLevelobject:ReturnsorsetsaBooleanthatrepresentswhethertheusercaneditrecordsinthespecifiedgroup.SetthispropertytoFalsetopreventusersfromeditingrecordsinagroup.ThedefaultvalueisTrue.Read/write.
PivotViewobject:ReturnsorsetsaBooleanthatrepresentswhethertheusercaneditcellsinthedetailareaofaPivotTablelist.SetthispropertytoTruetoallowtheusertoeditcellsinthedetailarea.ThedefaultvalueisFalse.Read/write.
expression.AllowEdits
expressionRequired.AnexpressionthatreturnsaGroupLevelorPivotViewobject.
![Page 794: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/794.jpg)
RemarksChangingacellvalueresultsinacorrespondingchangeinthesourcedatabase.Fieldsthataremarkedasread-onlyinthesourcedatabasecannotbeeditedinthePivotTablelist.
![Page 795: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/795.jpg)
ExampleThisexampleenableseditinginthedetailareaofPivotTable1.
PivotTable1.ActiveView.AllowEdits=True
![Page 796: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/796.jpg)
ShowAll
![Page 797: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/797.jpg)
AllowFilteringProperty
AllowFilteringpropertyasitappliestotheProtectionobject.
AllowFilteringpropertyasitappliestothePivotTableobject.
![Page 798: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/798.jpg)
ExampleAsitappliestotheProtectionobject.
AsitappliestothePivotTableobject.
![Page 799: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/799.jpg)
AllowFormattingColumnsProperty
Returnsorsetswhetherornotcolumnscanresizedonaprotectedworksheet.SetthispropertytoTruetoenablecolumnstoberesizedwhentheworksheetisprotected.ThedefaultvalueisFalse.Read/writeBoolean.
expression.AllowFormattingColumns
expressionRequired.AnexpressionthatreturnsaProtectionobject.
![Page 800: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/800.jpg)
ExampleThisexamplelocksallcellsonSheet1,andthenitenablestheusertoresizerowsandcolumns,andthenprotectsSheet1.
SubProtect_Worksheet()DimptProtSheet1
'Lockallcellsontheworksheet.Spreadsheet1.Worksheets("Sheet1").Cells.Locked=True
SetptProtSheet1=Spreadsheet1.Worksheets("Sheet1").Protection
'AllowsusertoresizerowswhileSheet1isprotected.ptProtSheet1.AllowFormattingRows=True
'AllowsusertoresizecolumnswhileSheet1isprotected.ptProtSheet1.AllowFormattingColumns=True
'ProtectSheet1.ptProtSheet1.Enabled=TrueEndSub
![Page 801: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/801.jpg)
AllowFormattingRowsProperty
Returnsorsetswhetherornotrowscanresizedonaprotectedworksheet.SetthispropertytoTruetoenablerowstoberesizedwhentheworksheetisprotected.ThedefaultvalueisFalse.Read/writeBoolean.
expression.AllowFormattingRows
expressionRequired.AnexpressionthatreturnsaProtectionobject.
![Page 802: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/802.jpg)
ExampleThisexamplelocksallcellsonSheet1,andthenitenablestheusertoresizerowsandcolumns,andthenprotectsSheet1.
SubProtect_Worksheet()
DimptProtSheet1
'Lockallcellsontheworksheet.Spreadsheet1.Worksheets("Sheet1").Cells.Locked=True
SetptProtSheet1=Spreadsheet1.Worksheets("Sheet1").Protection
'AllowsusertoresizerowswhileSheet1isprotected.ptProtSheet1.AllowFormattingRows=True
'AllowsusertoresizecolumnswhileSheet1isprotected.ptProtSheet1.AllowFormattingColumns=True
'ProtectSheet1.ptProtSheet1.Enabled=True
EndSub
![Page 803: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/803.jpg)
AllowGroupingProperty
TrueiftheuserisabletogroupfieldsontherowaxisorthecolumnaxisinthespecifiedPivotTablelist.IfthispropertyissettoFalse,thegroupingbuttonsaredisabledbuttheusercanstillgroupfieldsprogrammatically.ThedefaultvalueisTrue.Read/writeBoolean.
expression.AllowGrouping
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 804: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/804.jpg)
RemarksWhenthispropertyissettoFalse,pivotingisdisabled.Thismeansthatmembershipintherowandcolumnareasisfixed;youcannotdragafieldtoorfromtheseareas.Allcommandsrelatedtogroupingaredisabled,includingthefollowingcommands:
MovetoColumnArea
MovetoDetail,iftheselectionisafieldintheroworcolumnarea
MovetoFiltering
MovetoRowArea
IfFalse,thereportlayoutisfrozen,buttheusercanstillfilterthedata.
![Page 805: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/805.jpg)
ExampleThisexampledisablesfieldgroupingforthePivotTablelist.
PivotTable1.AllowGrouping=False
![Page 806: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/806.jpg)
AllowHeadingRenameProperty
Specifieswhetherrowandcolumnheadersinaprotectedworksheetcanbecustomized.SetthispropertytoTruetocustomizethecolumnheadersofaprotectedworksheet.ThedefaultvalueisFalse.Read/writeBoolean.
expression.AllowHeadingRename
expressionRequired.AnexpressionthatreturnsaProtectionobject.
![Page 807: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/807.jpg)
RemarksSettingtheCaptionpropertyofaroworcolumnheadingaftersettingthispropertytoFalseresultsinarun-timeerror.YoumustsettheEnabledpropertyoftheProtectionobjecttoTrueforthispropertytotakeeffect.
![Page 808: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/808.jpg)
ExampleThisexamplelocksallcellsonSheet1,enablestheinsertionanddeletionofcolumns,disablesthecustomizationofrowandcolumnheadings,andthenprotectsSheet1.
SubProtect_Worksheet()
DimptProtSheet1
'Lockallcellsontheworksheet.Spreadsheet1.Worksheets("Sheet1").Cells.Locked=True
SetptProtSheet1=Spreadsheet1.Worksheets("Sheet1").Protection
'AllowsusertodeletecolumnswhileSheet1isprotected.ptProtSheet1.AllowDeletingColumns=True
'AllowsusertoinsertcolumnswhileSheet1isprotected.ptProtSheet1.AllowInsertingColumns=True
'preventrowandcolumnheadingsfrombeingcustomized.ptProtectSheet1.AllowHeadingRename=False
'ProtectSheet1.ptProtectSheet1.Enabled=True
EndSub
![Page 809: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/809.jpg)
AllowInsertingColumnsProperty
Specifieswhetheraworksheetcolumncanbeinsertedwhentheworksheethasbeenprotected.ThedefaultvalueisFalse,butthispropertyhasnoeffectiftheEnabledpropertyoftheProtectionobjectissettoFalse.Read/writeBoolean.
expression.AllowInsertingColumns
expressionRequired.AnexpressionthatreturnsaProtectionobject.
![Page 810: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/810.jpg)
ExampleThisexamplelocksallcellsonSheet1,andthenitenablestheinsertionanddeletionofcolumns,andthenprotectsSheet1.
SubProtect_Worksheet()DimptProtSheet1
'Lockallcellsontheworksheet.Spreadsheet1.Worksheets("Sheet1").Cells.Locked=TrueSetptProtSheet1=Spreadsheet1.Worksheets("Sheet1").Protection'AllowsusertodeletecolumnswhileSheet1isprotected.ptProtSheet1.AllowDeletingColumns=True'AllowsusertoinsertcolumnswhileSheet1isprotected.ptProtSheet1.AllowInsertingColumns=True'ProtectSheet1.ptProtSheet1.Enabled=TrueEndSub
![Page 811: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/811.jpg)
AllowInsertingRowsProperty
Specifieswhetheraworksheetrowcanbeinsertedwhentheworksheethasbeenprotected.ThedefaultvalueisFalse,butthispropertyhasnoeffectiftheEnabledpropertyoftheProtectionobjectissettoFalse.Read/writeBoolean.
expression.AllowInsertingRows
expressionRequired.AnexpressionthatreturnsaProtectionobject.
![Page 812: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/812.jpg)
ExampleThisexamplelocksallcellsonSheet1,andthenitenablestheinsertionanddeletionofrows,andthenprotectsSheet1.
SubProtect_Worksheet()DimptProtSheet1
'Lockallcellsontheworksheet.Spreadsheet1.Worksheets("Sheet1").Cells.Locked=TrueSetptProtSheet1=Spreadsheet1.Worksheets("Sheet1").Protection'AllowsusertodeleterowswhileSheet1isprotected.ptProtSheet1.AllowDeletingRows=True'AllowsusertoinsertrowswhileSheet1isprotected.ptProtSheet1.AllowInsertingRows=True'ProtectSheet1.ptProtSheet1.Enabled=TrueEndSub
![Page 813: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/813.jpg)
AllowLayoutEventsProperty
SetthispropertytoTruetoenabletheAfterLayoutevent.ThedefaultvalueisFalse.Read/writeBoolean.
expression.AllowLayoutEvents
expressionRequired.AnexpressionthatreturnsaChartSpaceobject.
![Page 814: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/814.jpg)
ExampleThisexampleenablesalleventsforChartSpace1.
SubWindow_Onload()
'AllowtheAfterLayouteventtofire.ChartSpace1.AllowLayoutEvents=True
'AllowBeforeRenderandAfterRenderevents'tofireaseachdatapointisrendered.ChartSpace1.AllowPointRenderEvents=True
'AllowBeforeRenderandAfterRenderevents'tofireaseachchartelementisrendered.'TheAfterFinalRendereventwillfireafter'allchartelementshavebeenrendered.ChartSpace1.AllowRenderEvents=True
'AllowtheBeforeScreenTipeventtofire.ChartSpace1.AllowScreenTipEvents=True
EndSub
![Page 815: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/815.jpg)
AllowMultiFilterProperty
ReturnsorsetswhetherornottheusercanselectmultipleitemswhenthespecifiedfieldsetisinthefilterareaofaPivotTablelist.ThedefaultvalueisTrue.Read/writeBoolean.
expression.AllowMultiFilter
expressionRequired.AnexpressionthatreturnsaPivotFieldSetobject.
![Page 816: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/816.jpg)
RemarksSetthispropertytoFalsetoemulatethebehaviorofafieldsetinthefilterareaoftheMicrosoftOffice2000PivotTableComponent.
![Page 817: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/817.jpg)
ExampleThefollowingexampledisablestheselectionofmultipleitemsintheMerchantfieldwhenitisinthefilterareaofPivotTable1.
PivotTable1.ActiveView.FieldSets("Merchant").AllowMultiFilter=False
![Page 818: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/818.jpg)
AllowPointRenderEventsProperty
SetthispropertytoTruetoenabletheBeforeRenderandAfterRendereventstobecalledaseachdatapointisrendered.ThedefaultvalueisFalse.Read/writeBoolean.
expression.AllowPointRenderEvents
expressionRequired.AnexpressionthatreturnsaChartSpaceobject.
![Page 819: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/819.jpg)
ExampleThisexampleenablesalleventsforChartSpace1.
SubWindow_Onload()
'AllowtheAfterLayouteventtobecalled.ChartSpace1.AllowLayoutEvents=True
'AllowBeforeRenderandAfterRenderevents'tobecalledaseachdatapointisrendered.ChartSpace1.AllowPointRenderEvents=True
'AllowBeforeRenderandAfterRenderevents'tobecalledaseachchartelementisrendered.'TheAfterFinalRendereventwillfireafter'allchartelementshavebeenrendered.ChartSpace1.AllowRenderEvents=True
'AllowtheBeforeScreenTipeventtobecalled.ChartSpace1.AllowScreenTipEvents=True
EndSub
![Page 820: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/820.jpg)
AllowPropertyToolboxProperty
DetermineswhethertheusercandisplaytheCommandsandOptionsdialogboxatruntime.SettingtheAllowPropertyToolboxpropertytoFalsedisablestheCommandsandOptionsbuttononthetoolbar.ThedefaultvalueisTrue.Read/writeBoolean.
expression.AllowPropertyToolbox
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 821: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/821.jpg)
ExampleThisexampledisablestheCommandsandOptionsbuttonontheSpreadsheeet1toolbaratruntime.
Spreadsheet1.AllowPropertyToolbox=False
![Page 822: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/822.jpg)
AllowRenderEventsProperty
SetthispropertytoTruetoenabletheBeforeRender,AfterRender,andAfterFinalRenderevents.ThedefaultvalueisFalse.Read/writeBoolean.
expression.AllowRenderEvents
expressionRequired.AnexpressionthatreturnsaChartSpaceobject.
![Page 823: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/823.jpg)
ExampleThisexampleenablesalleventsforChartSpace1.
SubWindow_Onload()
'AllowtheAfterLayouteventtofire.ChartSpace1.AllowLayoutEvents=True
'AllowBeforeRenderandAfterRenderevents'tofireaseachdatapointisrendered.ChartSpace1.AllowPointRenderEvents=True
'AllowBeforeRenderandAfterRenderevents'tofireaseachchartelementisrendered.'TheAfterFinalRendereventwillfireafter'allchartelementshavebeenrendered.ChartSpace1.AllowRenderEvents=True
'AllowtheBeforeScreenTipeventtofire.ChartSpace1.AllowScreenTipEvents=True
EndSub
![Page 824: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/824.jpg)
AllowScreenTipEventsProperty
SetthispropertytoTruetoenabletheBeforeScreenTipevent.ThedefaultvalueifFalse.Read/writeBoolean.
expression.AllowScreenTipEvents
expressionRequired.AnexpressionthatreturnsaChartSpaceobject.
![Page 825: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/825.jpg)
RemarksTheBeforeScreenTipeventallowsyoutomodifyScreenTipsbeforetheyaredisplayed.
![Page 826: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/826.jpg)
ExampleThisexampleenablesalleventsforChartSpace1.
SubWindow_Onload()
'AllowtheAfterLayouteventtobecalled.ChartSpace1.AllowLayoutEvents=True
'AllowBeforeRenderandAfterRenderevents'tofireaseachdatapointisrendered.ChartSpace1.AllowPointRenderEvents=True
'AllowBeforeRenderandAfterRenderevents'tobecalledaseachchartelementisrendered.'TheAfterFinalRendereventwillbecalledafter'allchartelementshavebeenrendered.ChartSpace1.AllowRenderEvents=True
'AllowtheBeforeScreenTipeventtobecalled.ChartSpace1.AllowScreenTipEvents=True
EndSub
![Page 827: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/827.jpg)
AllowSortingProperty
Specifieswhetheraworksheetcanbesortedwhentheworksheethasbeenprotected.ThedefaultvalueisFalse,butthispropertyhasnoeffectiftheEnabledpropertyoftheProtectionobjectissettoFalse.Read/writeBoolean.
expression.AllowSorting
expressionRequired.AnexpressionthatreturnsaProtectionobject.
![Page 828: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/828.jpg)
ExampleThisexamplelocksallcellsonSheet1,enablesthefilteringandsortingofrowsandcolumns,andthenprotectstheworksheet.
SubProtect_Worksheet()DimptProtSheet1
'Lockallcellsontheworksheet.Spreadsheet1.Worksheets("Sheet1").Cells.Locked=TrueSetptProtSheet1=Spreadsheet1.Worksheets("Sheet1").Protection'AllowsusertofilterrowswhileSheet1isprotected.ptProtSheet1.AllowFiltering=True'AllowsusertosortrowsandcolumnswhileSheet1isprotected.ptProtSheet1.AllowSorting=True'ProtectSheet1.ptProtSheet1.Enabled=TrueEndSub
![Page 829: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/829.jpg)
AllowUISelectionProperty
Returnsorsetswhetheranelementonachartisselectedwhentheuserclicksonanelementwiththemouse.Read/writeBoolean.
expression.AllowUISelection
expressionRequired.AnexpressionthatreturnsaChartSpaceobject.
![Page 830: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/830.jpg)
Remarks
IfthispropertyissettoTrue,whenauserclicksonachartelementwiththemouse,thecurrentlistofselectionsisemptiedandreplacedwithonlytheelementthatwasclickedbytheuser.IfthispropertyissettoFalse,whentheuserclicksonanelementwiththemouse,thecurrentlistofselectionsispreservedandthemouseclickeventisignored.ThedefaultvalueisTrue.
![Page 831: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/831.jpg)
ExampleThefollowingexampledisablestheAllowUISelectionproperty.
ChartSpace1.AllowUISelection=False
![Page 832: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/832.jpg)
AllPageFieldsProperty
ReturnstheAllPageFieldscollectionforthedatasourcecontrol.Read-only.
Forinformationaboutreturningasinglememberofacollection,seeReturninganObjectfromaCollection.
![Page 833: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/833.jpg)
AlternateDataSourceProperty
ReturnsorsetstheIDofthealternatedatasource(anothercomplexdata-boundcontrolthatwillbeusedasthedatasource).Read/writeString.
expression.AlternateDataSource
expressionRequired.AnexpressionthatreturnsanElementExtensionobject.
![Page 834: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/834.jpg)
AlternateRowColorProperty
ReturnsorsetsaStringthatrepresentsthecolortouseforeveryotherrowinthespecifiedgroup.Read/write.
expression.AlternateRowColor
expressionRequired.AnexpressionthatreturnsaGroupLevelobject.
![Page 835: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/835.jpg)
AlwaysIncludeInCubeProperty
ReturnsorsetswhetherthespecifiedfieldsetisalwaysincludedinthePivotTablelist'slocalcache.SetthispropertytoTruetoensurethatthespecifiedfieldsetisincludedinthelocalcache.ThedefaultvalueisFalse.Read/writeBoolean.
expression.AlwaysIncludeInCube
expressionRequired.AnexpressionthatreturnsaPivotFieldSetobject.
![Page 836: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/836.jpg)
RemarksSettingthispropertytoTrueforafieldsetensuresthatcalculatedtotalsthatdependonthefieldsetwillcalculatecorrectly.
![Page 837: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/837.jpg)
AmbientLightIntensityProperty
ReturnsorsetsaDoublespecifyingthepercentageofambientlightilluminatingathree-dimensionalchart.Validsettingsrangefrom0to1.Read/write.
expression.AmbientLightIntensity
expressionRequired.AnexpressionthatreturnsaChChartobject.
![Page 838: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/838.jpg)
ExampleThisexampleconvertsthefirstchartinChartspace1toa3-DBarchartandsetsthelightingoptionsforthechart.
SubFormat3DLightSources()
Dimcht3DBar
'SetavariabletothefirstchartinChartspace1.Setcht3DBar=ChartSpace1.Charts(0)
'Changethecharttoa3DBarchart.cht3DBar.Type=chChartTypeBar3D
'Settheintensityoftheambientlight.cht3DBar.AmbientLightIntensity=0.7
'Settheinclinationofthedirectionallightsource.cht3DBar.DirectionalLightInclination=35
'Settheintensityofthedirectionallightsource.cht3DBar.DirectionalLightIntensity=0.8
'Settherotationofthedirectionallightsource.cht3DBar.DirectionalLightRotation=120
EndSub
![Page 839: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/839.jpg)
AmountProperty
Returnsorsetstheerroramountforfixed-valueandpercentageerrorbars.Youspecifydata-bounderrorbaramountsbyusingtheSetDatamethod.Read/writeDouble.
expression.Amount
expressionRequired.AnexpressionthatreturnsaChErrorBarsobject.
![Page 840: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/840.jpg)
RemarksThisvalueismathematicallycorrect,meaningthat5%isrepresentedas0.05andnot5.Anerrorbarwiththefixedamountof5willbecome500%whenchangedtoapercentage.
![Page 841: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/841.jpg)
ExampleThisexampleaddserrorbarstoalloftheseriesinthefirstchartofChartSpace1andthensetstheerroramount.
SubAdd_Error_Bars()DimebErrorBarsDimserChartSeriesDimchConstants
SetchConstants=ChartSpace1.Constants
'Loopthroughalloftheseriesinthefirstchart'ofChartSpace1.ForEachserChartSeriesinChartSpace1.Charts(0).SeriesCollection
'Adderrorbarstothecurrentseries.SetebErrorBars=serChartSeries.ErrorBarsCollection.Add
'Settheerrorbarstobeapercentageofthevalue.ebErrorBars.Type=chConstants.chErrorBarTypePercent
'Setthepercentageamount.ebErrorBars.Amount=0.05NextEndSub
![Page 842: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/842.jpg)
ShowAll
![Page 843: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/843.jpg)
ApplicationProperty
ApplicationpropertyasitappliestoallobjectsintheAppliesTolistexceptfortheOWCLanguageSettingsobject.
ApplicationpropertyasitappliestotheOWCLanguageSettingsobject.
![Page 844: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/844.jpg)
AspectRatioProperty
ReturnsorsetsaLongspecifyingtheratioofheighttothewidthofthespecifiedthree-dimensionalchart.Settingthispropertytoavaluegreaterthan100willmakeachartwhichistallerthanitiswide,whileavaluelessthan100willmakeachartwiderthanitistall.Validsettingsrangefrom0to500.Read/write.
expression.AspectRatio
expressionRequired.AnexpressionthatreturnsaChChartobject.
![Page 845: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/845.jpg)
RemarksThispropertyhasnoeffectona3-DPiechart.UsetheThicknesspropertytoincreasethethicknessofa3-DPiechart.
![Page 846: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/846.jpg)
ExampleThisexampleconvertsthefirstchartinChartspace1toa3-DColumnchartandthenincreasesthewidthanddepthofthechart.
SubFormat3DDepthWidth()
Dimcht3DColumn
'SetavariabletothefirstchartinChartspace1.Setcht3DColumn=ChartSpace1.Charts(0)
'Changethecharttoa3-DColumnchart.cht3DColumn.Type=chChartTypeColumnClustered3D
'Increasethedepthofthechartinrelation'toit'swidth.cht3DColumn.ChartDepth=125
'Increasethewidthofthechartinrelation'toit'sheight.cht3DColumn.AspectRatio=80
EndSub
![Page 847: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/847.jpg)
AsyncProperty
IndicateswhetherthebindingoftheXMLDataBindingobjectisasynchronousornot.Read-only.
expression.Async
expressionRequired.AnexpressionthatreturnsanXmlDataBindingobject.
![Page 848: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/848.jpg)
Remarks
YoucanusetheAsyncpropertyoftheXmlDataBindingobjecttofindoutifabindingsupportsasynchronousbinding.ItreturnsTrueifthebindingisasynchronous,otherwiseitreturnsFalse.ThedefaultvalueisFalse.
ItonlyaffectsthebehaviorofQuerybindings.WhenthevalueisTrue,onpageload,theSpreadsheetcomponentwillrenderalongwithanystaticdatabeforetheLoadMode=Normalbindingsactuallyoccurs.Whileasynchronousbindingsareinprogress,theSpreadsheetcomponentwillbenon-interactive(sameasViewOnlymode).Oncethebindingisdoneandtheeventshaveoccured,theuserinterfacewillbecomeinteractive.
WhenthevalueisFalse,thepagewillnotrenderuntilbindingswhereLoadMode=Normalhavecompletedloading.SubsequentrefreshoperationswithuserinterfacecommandsorwithcallstotheRefreshmethodwillnotresponduntilbindingoperationshavecompleted.
Whenanasynchronousbindingisinprogress,anyattempttoworkwithanXmlDataBindingobjectprogrammaticallywillfail.
![Page 849: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/849.jpg)
ExampleThefollowingVBScriptexamplechecksifthebindingstateofthefirstXMLDataBindingobjectintheXMLDataBindingscollectionisasynchronous.Ifitis,amessageboxisdisplayed.
SubAsync()
DimobjBindingSetobjBinding=Spreadsheet1.ActiveWorkbook.XmlDataBindings.Item(1)
'Checktoseeifthebindingisasynchronous.IfobjBinding.Async=TrueThen
'Alerttheuserifthebindingstateisasynchronous.MsgBox("Thebindingisasynchronous.")
EndIf
EndSub
![Page 850: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/850.jpg)
AutoFilterProperty
ReturnstheAutoFilterobjectforthespecifiedworksheet.
expression.AutoFilter
expressionAnexpressionthatreturnsaWorksheetobject.
![Page 851: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/851.jpg)
RemarksDonotconfusethispropertywiththeAutoFiltermethod.ThispropertyreturnstheAutoFilterobjectforagivenworksheet,whereastheAutoFiltermethodappliestoaRangeobjectandturnsontheAutoFilter.
![Page 852: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/852.jpg)
ExampleThisexampleturnsontheAutoFilterfortherangeA1:C20,setsfiltersforcolumnsAandC,andthenappliesthefilters.
SubApply_AutoFilter()DimafFiltersDimafCol1DimafCol3'TurnonAutoFilter.Spreadsheet1.Worksheets("Sheet1").Range("A1:C20").AutoFilter'SetavariabletotheAutoFilterobject.SetafFilters=Spreadsheet1.Worksheets("sheet1").AutoFilterSetafCol1=afFilters.Filters(1)SetafCol3=afFilters.Filters(3)'AddacriteriathatexcludesbluefromcolumnA.afCol1.Criteria.Add"blue"'AddacriteriathatexcludesgreenfromcolumnA.afCol1.Criteria.Add"green"'AddacriteriathatexcludesyellowfromcolumnC.afCol3.Criteria.Add"yellow"'Applythecriteria.afFilters.ApplyEndSub
![Page 853: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/853.jpg)
AutoFilterModeProperty
ReturnsTrueiftheAutoFilterdrop-downarrowsarecurrentlydisplayed.YoucansetthispropertytoFalsetohidethearrows,butyoucannotsetittoTrue.UsetheAutoFiltermethodtofilteralistanddisplaythedrop-downarrows.Read/writeBoolean.
expression.AutoFilterMode
expressionRequired.AnexpressionthatreturnsaWorksheetobject.
![Page 854: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/854.jpg)
RemarksIftheAutoFilterdrop-downarrowsarevisiblebutnorowsarecurrentlyfiltered(allrowsarevisible),theAutoFilterModepropertyisTrueandtheFilterModepropertyisFalse.
![Page 855: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/855.jpg)
ExampleThisexampleturnsofftheAutoFilterfortheactiveworksheet.
Spreadsheet1.ActiveSheet.AutoFilterMode=False
![Page 856: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/856.jpg)
AutoFitProperty
SpreadsheetorPivotTableobjects:TrueiftheoverallsizeofthespreadsheetorPivotTablelistisdeterminedbythenumberofvisiblecolumnsandrows.Therowheightandcolumnwidthcannotexceedthevalueofthespreadsheet’sorPivotTablelist’sMaxHeightandMaxWidthproperties.ThedefaultvalueisTrue.IftheAutoFitpropertyissettoFalse,theoverallsizeofthespreadsheetorPivotTablelistissetbasedonitsWidthandHeightproperties.Read/writeBoolean.
PivotAxisMemberorPivotTotalobjects:Trueifthewidthofthetotalissetautomatically.ThedefaultvalueisTrue.WhenthispropertyissettoTrue,anylayoutchangealsoupdatestheWidthandHeightpropertyvalues.WhenyouchangetheWidthandHeightvaluesprogrammatically,thevalueoftheAutoFitpropertyissettoFalse.Read/writeBoolean.
expression.AutoFit
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 857: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/857.jpg)
ExampleThisexampledisablesautomaticsizingforthePivotTablelistandthensetsitswidth.
NoteTheobjectpropertyoftheOBJECTHTMLelementisusedtoaccesstheWidthpropertyofthePivotTableobject(PivotTable1.Object.Width)becausetheOBJECTelementonanHTMLpagealsohasitsownWidthproperty.ThisisnotnecessarywhenaPivotTablecontrolisonauserformorotherActiveXcontainer.
SubDisableAutoFit()
PivotTable1.AutoFit=FalsePivotTable1.Object.Width=8000
EndSub
![Page 858: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/858.jpg)
AxesProperty
ReturnstheChAxescollectionforthespecifiedchart.UsetheAxespropertytosetthepropertiesforachartaxis.Read-only.
Forinformationaboutreturningasinglememberofacollection,seeReturninganObjectfromaCollection.
expression.Axes
expressionRequired.AnexpressionthatreturnsaChChartobject.
![Page 859: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/859.jpg)
ExampleThisexampleaddsatitleto,andchangesthefontofthevalueandcategoryaxesofthefirstchartinChartSpace1.
SubFormat_Chart_Axes()
DimaxCategoryAxisDimaxValueAxis
'SetavariabletotheCategory(X)axis.SetaxCategoryAxis=ChartSpace1.Charts(0).Axes(0)'SetavariabletotheValue(Y)axis.SetaxValueAxis=ChartSpace1.Charts(0).Axes(1)
'Thefollowingtwolinesofcodeenable,andthen'setthetitleforthecategoryaxis.axCategoryAxis.HasTitle=TrueaxCategoryAxis.Title.Caption="SalesbyQuarter"'Thefollowingthreelinesofcodesetthefont'forthevaluesdisplayedonthecategoryaxis.axCategoryAxis.Font="Tahoma"axCategoryAxis.Font.Size=8axCategoryAxis.Font.Bold=True
'Thefollowingtwolinesofcodeenable,andthen'setthetitleforthevalueaxis.axValueAxis.HasTitle=TrueaxValueAxis.Title.Caption="Dollars($)"
![Page 860: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/860.jpg)
'Thefollowingthreelinesofcodesetthefont'forthevaluesdisplayedonthevalueaxis.axValueAxis.Font="Tahoma"axValueAxis.Font.Size=8axValueAxis.Font.Bold=Trueendsub
![Page 861: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/861.jpg)
ShowAll
![Page 862: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/862.jpg)
AxisProperty
AxispropertyasitappliestothePivotResultFieldandPivotResultGroupFieldobjects.
AxispropertyasitappliestothePivotAxisMember,PivotColumnMember,PivotPageMember,andPivotRowMemberobjects.
![Page 863: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/863.jpg)
BackColorProperty
Returnsorsetsthebackgroundcolorforthespecifiedobjectorarea.Whenyousetthisproperty,youcanuseeitheraLongvaluerepresentingared-green-blue(RGB)colorvalueoraStringvaluerepresentingavalidHTMLcolorvalue.Forexample,tosettheobjectcolortored,youcouldusethehexadecimalvalue&HFF,thedecimalvalue255,orthestringvalue"red."InMicrosoftVisualBasic,youcanusetheRGBfunctiontocreateared-green-bluecolorvalue(forexample,redisRGB(255,0,0)).Read/writeVariant.expression.BackColor
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 864: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/864.jpg)
RemarksThispropertyalwaysreturnsthecolorasaLongvaluerepresentinganRGBcolorvalue.
![Page 865: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/865.jpg)
ExampleThisexamplesetsthefontsize,foregroundcolor,andbackgroundcolorforthetitlebarinPivotTable1.
SubFormat_Titlebar()DimvwViewSetvwView=PivotTable1.ActiveView'Setthebackgroundcolorofthetitlebar.vwView.Label.BackColor="DarkSalmon"'Setthefontsizeofthetitlebar.vwView.Label.Font.Size=16'Settheforegroundcolorofthetitlebar.vwView.Label.ForeColor="Sienna"EndSub
![Page 866: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/866.jpg)
BackWallProperty
ReturnsaChSurfaceobjectthatrepresentsthebackwallofathree-dimensionalchart.UsethepropertiesandmethodsofthereturnedChSurfaceobjecttoformatthebackwallofthespecifiedchart.
expression.BackWall
expressionRequired.AnexpressionthatreturnsaChPlotAreaobject.
![Page 867: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/867.jpg)
ExampleThisexampleconvertsthefirstchartinChartspace1toa3-DColumnchartandthenformatsthebackwall,sidewall,andfloorofthechart.
SubFormatWallsFloor()
Dimcht3DColumnDimchConstantsDimpaPlotArea
SetchConstants=ChartSpace1.Constants
'SetavariabletothefirstchartinChartspace1.Setcht3DColumn=ChartSpace1.Charts(0)
'Setavariabletotheplotarea.SetpaPlotArea=cht3DColumn.PlotArea
'Changethecharttoa3DColumnchart.cht3DColumn.Type=chConstants.chChartTypeColumnClustered3D
'Formatthebackwallofthechart.paPlotArea.BackWall.Interior.SetSolid"Yellow"paPlotArea.BackWall.Thickness=5
'Formatthesidewallofthechart.paPlotArea.SideWall.Interior.SetSolid"Yellow"paPlotArea.SideWall.Thickness=5
'Formatthefloorofthechart.paPlotArea.Floor.Interior.SetSolid"Blue"
![Page 868: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/868.jpg)
paPlotArea.Floor.Thickness=5
EndSub
![Page 869: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/869.jpg)
BarWidthProperty
Usetosetorspecifyaspecificwidthforthedatamarkersinbarandcolumncharts.ReturnsLong.Read/writeLong.
expression.BarWidth
expressionRequired.AnexpressionthatreturnsaChChartobject.
![Page 870: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/870.jpg)
Remarks
TheBarWidthpropertyisspecifiedinhundredthsofapoint(1/7200ofaninch.)Thedefaultvalueofzero(0)means"automatic".
SettingthispropertychangesthescrollviewextentoftheChScrollViewobjectofachartcontrol.Thispropertyisonlyvalidforbarandcolumncharts.Ithasnoeffectonothercharttypes.ThispropertyhasaneffectonlyiftheHorizontalExtentMaxpropertyforthecolumnchartsandtheVerticalExtentMaxpropertyforthebarchartarenon-zero.
AfteryousettheBarWidthproperty,userswon'tbeabletochangetheHorizontalExtentorVerticalExtentproperties.ChangingtheHorizontalExtentorVerticalExtentpropertieswillhavenoeffectbecausetheBarWidthpropertyvaluewilloverrideanyHorizontalExtentorVerticalExtentvaluesandmaintainthebarwidthuntiltheBarWidthpropertyisdisabled.YoudisabletheBarWidthpropertybysettingittozero(0).
![Page 871: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/871.jpg)
ExampleTheexamplebelowshowsyouhowtosetthebarwidthofthecharttooneinchbysettingitsvalueto7200.Ifyouwanttosetthebarwidthtohalfaninch,thevaluetospecifywouldbe3600.
Chartspace1.Charts(0).Barwidth=7200
![Page 872: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/872.jpg)
BaseNameProperty
Returnsthenameofthespecifiedfieldasitappearsinthesourcedatabase.Read-onlyString.
expression.BaseName
expressionRequired.AnexpressionthatreturnsaPivotFieldobject.
![Page 873: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/873.jpg)
RemarksAfieldcanhaveseveralnames,asshowninthefollowingtable.
Name DescriptionCaption Thenametheusersees.Name Thenameusedtoidentifythefieldincode.DataField Thenameofthefieldintheunderlyingrecordset.(Thisisnot
necessarilythesameasthebasename;youcanuseadifferentnameifthereisanamingconflictorifyouwanttomakethenameeasiertouseandremember.)
BaseName Thenameofthefieldintheoriginalsourcedatabase.
![Page 874: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/874.jpg)
BeginProperty
ReturnsaChSegmentBoundaryobjectthatrepresentsthebeginningofasegmentboundaryonaformatmap.
expression.Begin
expressionRequired.AnexpressionthatreturnsaChSegmentobject.
![Page 875: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/875.jpg)
RemarksUsetheValuepropertyofthereturnedChSegmentBoundaryobjecttosetthebeginningvalueforthespecifiedsegmentoftheformatmap.UsetheInterior,Line,andBorderpropertiestoformatthesegmentboundary.
![Page 876: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/876.jpg)
ExampleThisexamplebindsChartspace1totheOrderDetailstableintheSQLServerNorthwinddatabase.Then,aformatmapiscreatedthathighlightsthebottom10%ofthevaluesinredandthetop20%ofvaluesingreen.
SubWindow_Onload()
Dimserseries1DimsegBottom10PctDimsegTop20PctDimchConstants
SetchConstants=ChartSpace1.Constants
'ThefollowingtwolinesofcodebindChartspace1totheOrderDetailstableinthe'NorthwindSQLServerdatabase.ChartSpace1.ConnectionString="Provider=SQLOLEDB.1;PersistSecurityInfo=TRUE;"&_"IntegratedSecurity=SSPI;InitialCatalog=Northwind;"&_"DataSource=SeverName;"ChartSpace1.DataMember="OrderDetails"
'ThefollowingtwolinesofcodebindChartspace1totheQuantityandProductIDfields'intheOrderdetailstable.ChartSpace1.SetDatachConstants.chDimCategories,chConstants.chDataBound,"ProductID"ChartSpace1.SetDatachConstants.chDimValues,chConstants.chDataBound,"Quantity"
'Createaformatmap.ChartSpace1.SetDatachConstants.chDimFormatValues,chConstants.chDataBound,"Quantity"
'SetavariabletothefirstseriesinthefirstchartinChartspace1.Setserseries1=ChartSpace1.Charts(0).SeriesCollection(0)
![Page 877: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/877.jpg)
'Addasegmenttotheformatmap.Thissegmentwill'representthebottom10%ofvaluesinthechart.SetsegBottom10Pct=serseries1.FormatMap.Segments.Add
'Measurethesegmentboundariesbaseduponapercentage.segBottom10Pct.Begin.ValueType=chConstants.chBoundaryValuePercentsegBottom10Pct.End.ValueType=chConstants.chBoundaryValuePercent
'Setthebeginningvalueto0%,andtheendingvalueto10%.segBottom10Pct.Begin.Value=0segBottom10Pct.End.Value=0.1
'Formattheinteriorofthematchingvalues.segBottom10Pct.Begin.Interior.Color="red"segBottom10Pct.End.Interior.Color="red"
'Addasegmenttotheformatmap.Thissegmentwill'representthetop20%ofvaluesinthechart.SetsegTop20Pct=serseries1.FormatMap.Segments.Add
'Measurethesegmentboundariesbaseduponapercentage.segTop20Pct.Begin.ValueType=chConstants.chBoundaryValuePercentsegTop20Pct.End.ValueType=chConstants.chBoundaryValuePercent
'Setthebeginningvalueto80%,andtheendingvalueto100%.segTop20Pct.Begin.Value=0.8segTop20Pct.End.Value=1
'Formattheinteriorofthematchingvalues.segTop20Pct.Begin.Interior.Color="Green"segTop20Pct.End.Interior.Color="Green"
![Page 878: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/878.jpg)
EndSub
![Page 879: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/879.jpg)
BindingDataProperty
ReturnsorsetstheconfigurationdataforagivenXmlDataBindingobject.Read/writeString.
expression.BindingData
expressionRequired.AnexpressionthatreturnsanXmlDataBindingobject.
![Page 880: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/880.jpg)
Remarks
TheXmlDataBindingobjectcontainsconfigurationdataintheformofXML.TheformatoftheconfigurationdatamustfollowtheSpreadsheetcomponentXMLschemaasdefinedintheXMLspreadsheetfile.TheBindingIdisanewXMLfragmentthatmustbethesameasthecurrentvalue,orarun-timeerrorwillbegenerated.TheBindingIDistheIDattributeofanXmlDataBindingobjectandmustbeuniqueacrossallworksheetsinaworkbook.
![Page 881: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/881.jpg)
ExampleThefollowingexamplefirstgetsthenumberofXMLDataBindingobjectsintheXmlDataBindingscollectionoftheWorkbookobject.ThenititeratesthrougheachoftheXMLDataBindingobjectstogettheBindingDataproperty.
SubViewBindings()
DimstrXmlDimintBindingDimintCounter
'GetthenumberofXmlDataBindingobjectsintheXmlDataBindingscollection.intBinding=Spreadsheet1.ActiveWorkbook.XmlDataBindings.Count'Displayamessagebox. MsgBox("Thereare"&intBinding&"XmlDataBindingobjectsinthecollection") 'LoopthrougheachXmlDataBindingobjectinthecollection.intCounter=1ForintCounter=1tointBinding
'GettheconfigurationdataforagivenXmlDataBindingobjectfromaXmlDataBindingscollection. strXml=Spreadsheet1.ActiveWorkbook.XmlDataBindings.Item(intCounter).BindingData MsgBox("Bindingitem#"&intCounter&"returnedXML:"&chr(10)&strXml) Next
EndSub
![Page 882: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/882.jpg)
ShowAll
![Page 883: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/883.jpg)
BindingInProgressProperty
AsitappliestotheXmlDataBindingobject.
![Page 884: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/884.jpg)
AsitappliestotheXmlDataBindingscollection.
![Page 885: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/885.jpg)
ExampleAsitappliestotheXmlDataBindingscollection.
![Page 886: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/886.jpg)
BoldProperty
Fontobject:Trueifthespecifiedfontisbold.Read/writeVariant(returnsNullifsomecellsintherangeareboldandsomearenot).UsetheIsNullfunctiontodeterminewhetherthereturnvalueisNull.
PivotFontandChFontobjects:ReturnsorsetsaBooleanthatdetermineswhetherthefontforthespecifiedobjectisbold.Read/write.
expression.Bold
expressionRequired.Anexpressionthatreturnsoneoftheaboveobjects.
![Page 887: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/887.jpg)
ExampleThisexamplesetsfontpropertiesforthespecifiedaxisinthechartworkspace.
SubSetAxisFont()
Dimaxs
Setaxs=ChartSpace1.Charts(0).Axes(1)
axs.Font.Name="Arial"axs.Font.Size=8axs.Font.Bold=True
EndSub
![Page 888: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/888.jpg)
BookmarkProperty
ReturnsaVariantthatidentifiesthebookmarkinthecurrentADOrecordset.Read-only.
expression.Bookmark
expressionRequired.AnexpressionthatreturnsaPivotDetailCellobject.
![Page 889: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/889.jpg)
BorderProperty
ReturnsaChBorderobjectthatrepresentstheborderofthespecifiedobject.
expression.Border
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 890: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/890.jpg)
RemarksTheborderforachartseriesrepresentstheoutlinecoloroncolumn,bar,pie,doughnut,area,andhigh-low-closecharts.Onchartswithmarkers(suchasalinechartwithmarkers),theborderrepresentstheoutlinecolorforthemarkers.
![Page 891: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/891.jpg)
ExampleThisexamplesetsthelineweightoftheborderforthespecifiedseriesinthechartworkspace.
SubSetBorder()
DimchConstants
SetchConstants=ChartSpace1.Constants
ChartSpace1.Charts(0).SeriesCollection(0).Border_.Weight=chConstants.owcLineWeightMedium
EndSub
![Page 892: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/892.jpg)
BordersProperty
ReturnsaBorderscollectionthatrepresentsthefourbordersofarangeofcells.Read-only.
expression.Borders
expressionRequired.AnexpressionthatreturnsaRangeobject.
![Page 893: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/893.jpg)
ExampleThisexampleaddsamedium-weightgreenbordertoeachcellintherangeB5:C10onSheet1.
SubSetBorders()DimssConstantsDimrngBorderSetssConstants=Spreadsheet1.Constants'Setavariabletotherangetoaddthebordersto.SetrngBorder=Spreadsheet1.Worksheets("Sheet1").Range("b5:c10")
'Settheborderweight.rngBorder.Borders.Weight=ssConstants.owcLineWeightMedium'Setthebordercolor.rngBorder.Borders.Color="green"EndSub
![Page 894: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/894.jpg)
ShowAll
![Page 895: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/895.jpg)
BottomProperty
BottompropertyasitappliestotheChPlotAreaobject.
BottompropertyasitappliestotheChartSpace,ChAxis,ChCategoryLabel,ChChart,ChChartField,ChDataLabel,ChDataLabels,ChDropZone,ChErrorBars,ChLegend,ChLegendEntry,ChPoint,ChSeries,ChScrollView,ChTitle,andChTrendlineobjects.
![Page 896: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/896.jpg)
ShowAll
![Page 897: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/897.jpg)
BottomRightProperty
BottomRightpropertyasitappliestothePivotRangeobject.
BottomRightpropertyasitappliestothePivotDetailRangeobject.
![Page 898: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/898.jpg)
BoundFieldProperty
ReturnsthePivotFieldobjectusedfordata-bindinginformationwhenthesourceisarecordset.Whenthesourceismultidimensional,thispropertyreturnsNothing.
expression.BoundField
expressionRequired.AnexpressionthatreturnsaPivotFieldSetobject.
![Page 899: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/899.jpg)
BubbleScaleProperty
Returnsorsetsascalefactorforallbubbleseriesonthespecifiedchart.Thedefaultvalueis100,andthevalidrangeis0–300.Thevalueofthispropertyindicatesthebubblesizerelativetothedefaultsetting.SettingtheBubbleScalepropertyto300(threetimesgreaterthanthedefaultvalue)producesachartonwhichthebubblesappearthreetimesthedefaultsize.Read/writeDouble.
expression.BubbleScale
expressionRequired.AnexpressionthatreturnsaChChartobject.
![Page 900: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/900.jpg)
ExampleThisexamplesetsthebubblescalefactorforthespecifiedchartinthechartworkspace.NotethatCharts(0)mustrefertoabubblechart.
ChartSpace1.Charts(0).BubbleScale=200
![Page 901: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/901.jpg)
BuildProperty
ReturnsaLongthatrepresentstheMicrosoftOfficeWebComponentsbuildnumber.Read-only.
expression.Build
expressionRequired.AnexpressionthatreturnsaSpreadsheetobject.
![Page 902: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/902.jpg)
RemarksThispropertyreturnsthesameinformationastheBuildNumberproperty,butasaLonginsteadofasaString.
![Page 903: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/903.jpg)
BuildNumberProperty
ReturnstheMicrosoftOfficeWebComponentsbuildnumber.Read-onlyString.
expression.BuildNumber
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 904: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/904.jpg)
ExampleThisexampledisplaystheMicrosoftOfficeWebComponentsbuildnumberintheactivecellofSpreadsheet1.
Spreadsheet1.ActiveCell.Value="MSOWCBuild"&Spreadsheet1.BuildNumber
![Page 905: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/905.jpg)
ButtonBorderProperty
ReturnsaChBorderobjectthatrepresentstheborderofeachbuttoninthespecifieddropzone.UsethepropertiesofthereturnedChBorderobjecttoformattheborderofeachbuttoninthedropzone.
expression.ButtonBorder
expressionRequired.AnexpressionthatreturnsaChDropZoneobject.
![Page 906: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/906.jpg)
ExampleThisexampleformatsthebuttonandthewatermarkoftheseriesdropzoneinChartspace1.
SubSetupDropZone()
DimdzSeriesDropZoneDimChConstants
SetchConstants=Chartspace1.Constants
'SetavariabletotheseriesdropzoneinChartspace1.SetdzSeriesDropZone=ChartSpace1.DropZones(chConstants.chDropZoneSeries)
'Thenextthreelinesofcodeformatthebuttonofthedropzone.dzSeriesDropZone.ButtonBorder.Weight=chConstants.owcLineWeightMediumdzSeriesDropZone.ButtonInterior.SetSolid"Red"dzSeriesDropZone.ButtonFont.Size=14
'Thenextthreelinesofcodeformatthewatermarkofthedropzone.dzSeriesDropZone.WatermarkBorder.Color="Red"dzSeriesDropZone.WatermarkFont.Color="Red"dzSeriesDropZone.WatermarkInterior.SetSolid"Green"
EndSub
![Page 907: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/907.jpg)
ButtonFontProperty
ReturnsaChFontobjectthatrepresentsthefontofeachbuttoninthespecifieddropzone.UsethepropertiesofthereturnedChFontobjecttoformatthefontofeachbuttoninthedropzone.
expression.ButtonFont
expressionRequired.AnexpressionthatreturnsaChDropZoneobject.
![Page 908: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/908.jpg)
ExampleThisexampleformatsthebuttonandthewatermarkoftheseriesdropzoneinChartspace1.
SubSetupDropZone()
DimdzSeriesDropZoneDimChConstants
SetchConstants=Chartspace1.Constants
'SetavariabletotheseriesdropzoneinChartspace1.SetdzSeriesDropZone=ChartSpace1.DropZones(chConstants.chDropZoneSeries)
'Thenextthreelinesofcodeformatthebuttonofthedropzone.dzSeriesDropZone.ButtonBorder.Weight=chConstants.owcLineWeightMediumdzSeriesDropZone.ButtonInterior.SetSolid"Red"dzSeriesDropZone.ButtonFont.Size=14
'Thenextthreelinesofcodeformatthewatermarkofthedropzone.dzSeriesDropZone.WatermarkBorder.Color="Red"dzSeriesDropZone.WatermarkFont.Color="Red"dzSeriesDropZone.WatermarkInterior.SetSolid"Green"
EndSub
![Page 909: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/909.jpg)
ButtonInteriorProperty
ReturnsaChInteriorobjectthatrepresentstheinteriorofeachbuttoninthespecifieddropzone.UsethepropertiesofthereturnedChInteriorobjecttoformattheinteriorofeachbuttoninthedropzone.
expression.ButtonInterior
expressionRequired.AnexpressionthatreturnsaChDropZoneproperty.
![Page 910: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/910.jpg)
RemarksBydefault,thechartcontrolusesthecolorsettingspecifiedfor3DObjectsontheAppearancetaboftheDisplayControlPanelastheinteriorcolorfordropzonebuttons.
![Page 911: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/911.jpg)
ExampleThisexampleformatsthebuttonandthewatermarkoftheseriesdropzoneinChartspace1.
SubSetupDropZone()
DimdzSeriesDropZoneDimChConstants
SetchConstants=Chartspace1.Constants
'SetavariabletotheseriesdropzoneinChartspace1.SetdzSeriesDropZone=ChartSpace1.DropZones(chConstants.chDropZoneSeries)
'Thenextthreelinesofcodeformatthebuttonofthedropzone.dzSeriesDropZone.ButtonBorder.Weight=chConstants.owcLineWeightMediumdzSeriesDropZone.ButtonInterior.SetSolid"Red"dzSeriesDropZone.ButtonFont.Size=14
'Thenextthreelinesofcodeformatthewatermarkofthedropzone.dzSeriesDropZone.WatermarkBorder.Color="Red"dzSeriesDropZone.WatermarkFont.Color="Red"dzSeriesDropZone.WatermarkInterior.SetSolid"Green"
EndSub
![Page 912: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/912.jpg)
ShowAll
![Page 913: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/913.jpg)
CalculationProperty
ReturnsorsetsanXlCalculationconstantspecifyingthecalculationmode.Read/write.
expression.Calculation
expressionRequired.AnexpressionthatreturnsaSpreadsheetobject.
![Page 914: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/914.jpg)
ExampleThisexampleplacesSpreadsheet1intomanualcalculationmode.
SubManualCalculationMode()
DimssConstants
SetssConstants=Spreadsheet1.Constants
'SetSpreadsheet1tomanualcalculationmode.Spreadsheet1.Calculation=ssConstants.xlCalculationManual
EndSub
![Page 915: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/915.jpg)
CalculationVersionProperty
Returnsanumberwhoserightmosttwodigitsaretheminorversionnumberofthecalculationengine,andwhoseotherdigits(ontheleft)arethemajorversionoftheMicrosoftOfficeSpreadsheetComponent.Read-onlyLong.
expression.CalculationVersion
expressionRequired.AnexpressionthatreturnsaSpreadsheetorWorkbookobject.
![Page 916: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/916.jpg)
CanQueryProperty
ReturnsTrueiftheXmlDataBindingobject(asspecifiedinthe<Binding>elementintheXMLSpreadsheetfile)containsachild<DataSource>elementwithaPurposeattribute(/Binding/DataSource/ConnectionInfo@Purpose)thathasthevalue"Query".OtherwiseitreturnsFalse.Read-only.
expression.CanQuery
expressionRequired.AnexpressionthatreturnsanXmlDataBindingobject.
![Page 917: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/917.jpg)
Remarks
IfTrueisreturned,thePurposeattributeofthe<DataSource>elementhasthevalue"Query".ThismeansyoucancalltheRefreshmethodoftheXmlDataBindingobjecttorequerythedatasource.NotethatanXMLDataBindingobjectcancontainmorethanone<DataSource>elementtag:oneinwhichPurposehasthevalue"Query"andoneinwhichPurposeis"Update".Forinformationonupdatebindings,seetheCanUpdateproperty.
AnXMLDataBindingobjectrepresentsabindingtoanXMLfile,aSOAPservice,anotherWebpart(onlywhenbindingfromaSpreadsheetWebPart),oradataretrievalserviceconnection.
TheXMLfragmentwherethe<DataSource>elementdetailsappearintheXMLSpreadsheetfilelookssomethinglikethefollowing:
<x2:Bindingx2:ID="Cust_bind_id"x2:LoadMode="Normal"x2:Async="False"><x2:MapID>Cust_MapId</x2:MapID><udc:DataSourceMajorVersion="1"MinorVersion="0"><udc:TypeType="XMLFile"MajorVersion="1"MinorVersion="0"/><udc:Name>sample_name</udc:Name><udc:ConnectionInfoPurpose="Query">...</udc:ConnectionInfo></udc:DataSource>
![Page 918: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/918.jpg)
ExampleThefollowingexampleattemptstorefreshabinding.ThiswillcauseaneventhandlerfortheBindingCompletedeventtorun,whichdetermineswhetherabindingcanbequeried(thatis,whetheritsPurposeattributehasthevalue"Query").Youcanwritecodeintheeventhandlertoperformanyadditionalactionsonthebinding.
SubRefreshBinding(Spreadsheet1)DimobjBinding
SetobjBinding=Spreadsheet1.ActiveWorkbook.XmlDataBindings("Cust_bind_id")objBinding.Refresh
EndSub
SubSpreadsheet1_BindingCompleted(bindingID,Action)
IfSpreadsheet1.ActiveWorkbook.XmlDataBindings.Item(bindingID).CanQuery=TrueThen'Writecodeheretoperformanyadditionalactionsonthisquerybinding.EndIf
EndSub
NoteForinformationontrappingtheBindingCompletedeventfromscriptrunninginaWebpage,seetheBindingCompletedeventtopic.
![Page 919: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/919.jpg)
CanUndoProperty
Trueifthereisapreviousactionthatcanbeundone.Read-onlyBoolean.
expression.CanUndo
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 920: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/920.jpg)
ExampleThisexampleundoesthelastactionperformedordisplaysamessageboxiftheactioncannotbeundone.
SubUndo_Action()IfSpreadsheet1.CanUndoThenSpreadsheet1.UndoElseMsgBox"Can'tundolastaction."EndIfEndSub
![Page 921: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/921.jpg)
CanUpdateProperty
ReturnsTrueiftheXmlDataBindingobject(asspecifiedbythe<Binding>elementintheXMLSpreadsheetfile)containsa<DataSource>elementwithaPurposeattribute(/Binding/DataSource/ConnectionInfo@Purpose)thathasthevalue"Update".OtherwiseitreturnsFalse.Read-only.
expression.CanUpdate
expressionRequired.AnexpressionthatreturnsanXmlDataBindingobject.
![Page 922: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/922.jpg)
Remarks
NotethatanXMLDataBindingobjectcancontainmorethanone<DataSource>elementtag:oneinwhichPurposehasthevalue"Query"andoneinwhichPurposeis"Update".Forinformationonupdatebindings,seetheCanUpdateproperty.
AnXMLDataBindingobjectrepresentsabindingtoanXMLfile,aSOAPservice,anotherWebpart(onlywhenbindingfromaSpreadsheetWebPart),oradataretrievalserviceconnection.
TheXMLfragmentwherethedetailsappearintheXMLSpreadsheetfilelookssomethinglikethefollowing:
<udc:DataSourceMajorVersion="1"MinorVersion="0"xmlns:udc="http://schemas.microsoft.com/data/udc"><udc:TypeType="XMLFile"MajorVersion="1"MinorVersion="0"/><udc:Name>Example_Filename<udc:Name/><udc:ConnectionInfoPurpose="Update">...</udc:ConnectionInfo></udc:DataSource>
![Page 923: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/923.jpg)
ExampleThefollowingexamplefirstdetermineswheteradataretrievalserviceconnectionbindingcanbeupdated(thatis,whetheritsPurposeattributehasthevalue"Update").Ifso,thecodecallstheUpdateBindingfunction,passingintheBindingIdattributevalueastheargument.Becauseupdatebindingsarealwaysperformedsynchronously,thereisnoneedtocheckifthebindingisasynchronous,andthefunctioncallstheUpdatemethodimmediately.
DimobjBinding
SetobjBinding=Spreadsheet1.ActiveWorkbook.XmlDataBindings("Cust_bind_id")IfobjBinding.CanUpdate=TrueThen'Fetchthedataandupdatethecorrespondingmap.UpdateBinding("Cust_bind_id")EndIfNext
FunctionUpdateBinding(strBindingID)DimobjBindingSetobjBinding=Spreadsheet1.ActiveWorkbook.XmlDataBindings(strBindingID)
objBinding.UpdateEndFunction
![Page 924: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/924.jpg)
ShowAll
![Page 925: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/925.jpg)
CaptionProperty
CaptionpropertyasitappliestotheChSeries,ChTitle,ChTrendline,Heading,Spreadsheet,PivotField,PivotFieldSet,PivotLabel,PivotMemberProperty,PivotTotal,andTitleBarobjects.
CaptionpropertyasitappliestotheChCategoryLabel,PivotAxisMember,PivotColumnMember,PivotMember,PivotPageMember,PivotResultMemberProperty,andPivotRowMemberobjects.
![Page 926: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/926.jpg)
ExampleAsitappliestotheSpreadsheetobject.
![Page 927: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/927.jpg)
ShowAll
![Page 928: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/928.jpg)
CaptionHAlignmentProperty
ReturnsorsetsthehorizontalalignmentforthedetailfooterlabelinthespecifiedPivotTablelist.Read/writePivotHAlignmentEnum.
expression.CaptionHAlignment
expressionRequired.AnexpressionthatreturnsaPivotTotalobject.
![Page 929: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/929.jpg)
RemarksCaptionscanbedisplayedonlytotheleftofaggregatesinthedetailfooter.UsetheCaptionHAlignmentpropertytoalignthecaptionclosetotheaggregate(plHAlignRight)ortoalignthecaptionclosetotheleftedgeofthefooter(plHAlignLeft).Ifthereisanotheraggregatedisplayedtotheleft,thecaptionisdisplayedtotherightoftheotheraggregate.Ifthereisnotenoughroomtodisplaythecaption,itisnotvisible.
![Page 930: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/930.jpg)
ExampleThisexampleformatstotalsandtheircaptionsinthePivotTable1.
SubSet_Total_Alignment()DimptConstantsDimvwViewDimtotTotal
SetptConstants=PivotTable1.ConstantsSetvwView=PivotTable1.ActiveView'Loopthroughalltotalsintheview.ForEachtotTotalinvwView.DataAxis.Totals'Setthehorizontalalignmentofthetotaltocenter.totTotal.HAlignment=ptConstants.plHAlignCenter'Setthehorizontalalignmentofthecaptiontocenter.totTotal.CaptionHAlignment=ptConstants.plHAlignCenterNextEndSub
![Page 931: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/931.jpg)
CaptionSectionProperty
Trueifthespecifiedgrouplevelhasacaptionsectionshowing.Read/writeBoolean.
expression.CaptionSection
expressionRequired.AnexpressionthatreturnsaGroupLevelobject.
![Page 932: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/932.jpg)
RemarksThecaptionsectionappearsonadataaccesspageonlyonce,aboveallthevisiblerecordsatagivengrouplevel.Thecaptionsectionremainsvisibleasyouscrollthroughtherecords.
![Page 933: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/933.jpg)
CategoryLabelsProperty
ReturnsthecollectionofChCategoryLabelsforthespecifiedaxis.Validonlyforcategoryandtimescaleaxes.
expression.CategoryLabels
expressionRequired.AnexpressionthatreturnsaChAxisobject.
![Page 934: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/934.jpg)
CellProperty
ReturnsaPivotCellobjectthatindicatesthelocationoftheaggregatecellordetailcell.UsethispropertytoreturnmoreinformationabouttheselectedareainaPivotTablelist.
expression.Cell
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 935: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/935.jpg)
ExampleThisexampleutilizestheDoubleClickeventofPivotTable1todisplaymoreinformationaboutacellinthedetailareaofthePivotTable.ThisexampleassumesthatPivotTable1isusingtheCustomerstableformtheNorthwinddatabase.
SubPivotTable1_DblClick()DimptSelectionDimnRowDimrs
SetptSelection=PivotTable1.Selection
'Ifthecurrentselectionisinthe'detailareaofthePivotTablelist.IfTypeName(ptSelection)="PivotDetailRange"then
nRow=ptSelection.TopLeft.Row
'Setavariabletotherecordsetofthetop-left'cellintheselection.Setrs=ptSelection.TopLeft.Cell.Recordset
'Movethecursorthethecorrectrecordintherecordset.rs.MovenRow
MsgBox"Therowthatwasdouble-clickedwas..."&String(2,vbCrLf)&_"CustomerID="&rs("CustomerID")&vbCrLf&_"CompanyName="&rs("CompanyName")&vbCrLf&_"ContactName="&rs("ContactName")ElseMsgBox"Double-clickonarow!",vbExclamation
![Page 936: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/936.jpg)
EndIf
EndSub
![Page 937: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/937.jpg)
ShowAll
![Page 938: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/938.jpg)
CellsProperty
CellspropertyasitappliestotheRange,Spreadsheet,andWorksheetobjects.
CellspropertyasitappliestothePivotDataandPivotRangeobjects.
![Page 939: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/939.jpg)
ExampleAsitappliestotheRange,Spreadsheet,andWorksheetobjects.
![Page 940: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/940.jpg)
CellsExProperty
ReturnsaPivotCellobjectthatrepresentstheintersectionofthespecifiedrow,column,andpagemembers.
expression.CellsEx(Row,Column,Page)
expressionRequired.AnexpressionthatreturnsaPivotDataobject.
RowRequiredPivotRowMemberobject.Specifiestherowcontainingthereturnedcell.
ColumnRequiredPivotColumnMemberobject.Specifiesthecolumncontainingthereturnedcell.
PageRequiredPivotPageMemberobject.Specifiesthepagecontainingthereturnedcell.
![Page 941: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/941.jpg)
ExampleThisexamplesetsavariabletothetotalamountshippedvia2-Dayshippingtopostalcode28016inNorthCarolina.
SubGet2DayShippingToNC()
DimptDataDimpmRowMemberDimpmColMemberDimpmPageMemberDimpmIntersectionDimdblShipTotal
SetptData=PivotTable1.ActiveData
'Setavariabletoarowfieldmember.SetpmRowMember=ptData.RowAxis.Member.ChildAxisMembers("NorthCarolina")
'Setavariabletoacolumnfieldmember.SetpmColMember=ptData.ColumnAxis.Member.ChildAxisMembers("2-Day")
'Setavariabletoapagefieldmember.SetpmPageMember=ptData.PageAxis.Member.ChildAxisMembers("28016")
'Setavariabletotheintersectionoftherow,column,andpagefieldmembers.SetpmIntersection=ptData.CellsEx(pmRowMember,pmColMember,pmPageMember)
'Setavariabletothetotalshippingamountfortheitem.dblShipTotal=pmIntersection.Aggregates("Shipping").Value
EndSub
![Page 942: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/942.jpg)
![Page 943: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/943.jpg)
ChartDepthProperty
ReturnsorsetsaLongspecifyingthedepthofathree-dimensionalchartinrelationtoit'swidth.Settingthispropertytoavalueavaluegreaterthan100willmakeachartwhichisdeeperthanitiswide,whileavaluelessthan100willmakeachartwiderthanitisdeep.Validsettingsrangefrom0to500.Read/write.
expression.ChartDepth
expressionRequired.AnexpressionthatreturnsaChChartobject.
![Page 944: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/944.jpg)
RemarksThispropertyhasnoeffectona3-DPiechart.
![Page 945: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/945.jpg)
ExampleThisexampleconvertsthefirstchartinChartspace1toa3-DColumnchartandthenincreasesthewidthanddepthofthechart.
SubFormat_3D_Depth_Width()
Dimcht3DColumn
'SetavariabletothefirstchartinChartspace1.Setcht3DColumn=ChartSpace1.Charts(0)
'Changethecharttoa3DColumnchart.cht3DColumn.Type=chChartTypeColumnClustered3D
'Increasethedepthofthechartinrelation'toit'swidth.cht3DColumn.ChartDepth=125
'Increasethewidthofthechartinrelation'toit'sheight.cht3DColumn.AspectRatio=80
EndSub
![Page 946: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/946.jpg)
ChartFieldsProperty
ReturnsaChChartFieldsobjectasthecollectionoffieldsthathavebeenaddedtothespecifieddropzone.
expression.ChartFields
expressionRequired.AnexpressionthatreturnsaChDropZoneobject.
![Page 947: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/947.jpg)
ExampleThisexampledisplaysthenumberoffieldsthathavebeenaddedtotheseriesdropzoneinChartspace1.
SubSetupDropZone()
DimdzSeriesDropZoneDimChConstants
SetchConstants=Chartspace1.Constants
'SetavariabletotheseriesdropzoneinChartspace1.SetdzSeriesDropZone=ChartSpace1.DropZones(chConstants.chDropZoneSeries)
'Displaythenumberoffieldsthathavebeenaddedtothe'seriesdropzone.MsgBoxdzSeriesDropZone.ChartFields.Count
EndSub
![Page 948: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/948.jpg)
ShowAll
![Page 949: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/949.jpg)
ChartLayoutProperty
Returnsorsetsthelayoutforallthechartsinthespecifiedchartworkspace.Read/writeChartChartLayoutEnum.
expression.ChartLayout
expressionRequired.AnexpressionthatreturnsaChartSpaceobject.
Becausethechartworkspacecancontainoneormorecharts,youcanuseboththeChartLayoutandChartWrapCountpropertiestospecifyhowmultiplechartsarepositioned.TheChartLayoutpropertymakesitpossibletocreatecustomchartarrangements,suchasthreechartspositionedhorizontallyinasinglerow.
Therearetwodistinctlayouttypesforcharts:
ChChartLayoutHorizontalChartsarepositionedhorizontallyfromlefttorightuntilthenumberofchartsspecifiedbytheChartWrapCountpropertyisreached.Whenthisoccurs,anewrowiscreatedbelowtheactiverowandthepositioningprocessbeginsagainattheleft.Thismethodcontinues(wrappingeveryChartWrapCountnumber)untilallchartshavebeenplaced.
ChChartLayoutVerticalChartsarepositionedverticallyfromtoptobottomuntilthenumberofchartsspecifiedbytheChartWrapCountpropertyisreached.Whenthisoccurs,anewcolumniscreatedtotherightoftheactivecolumnandpositioningbeginsagainatthetop.Thismethodcontinues(wrappingeveryChartWrapCountnumberofcharts)untilallchartshavebeenplaced.
![Page 950: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/950.jpg)
ExampleThisexamplesetstheChartWrapCountandChartLayoutpropertiesandthenaddssixadditionalchartstothespecifiedchartworkspace.
SubAddCharts()DimchtChartDimchConstantsDimiCtrSetchConstants=ChartSpace1.Constants'Setthechartworkspacesothataroworcolumn'ofchartsiscreatedforeverytwocharts'inthechartworkspace.ChartSpace1.ChartWrapCount=2'Setthechartworkspacesothatthechartsarelaidourhorizontally.'Sincethiscodeaddssixchartstothechartworkspaceandthe'ChrtWrapCountpropertyhasbeensettowrapeverytwocharts,'thenthecoderesultsinthreerowsoftwocharts.ChartSpace1.ChartLayout=chConstants.chChartLayoutHorizontalForiCtr=1To6'Addacharttothechartworkspace.SetchtChart=ChartSpace1.Charts.Add'Enablethecharttitle.chtChart.HasTitle=True'Addatitletothechartthatindicatestheorder'inwhichthechartwascreated.
![Page 951: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/951.jpg)
chtChart.Title.Caption="Chart#"&iCtr'Specifythatthechartistobealinechart.chtChart.Type=chConstants.chChartTypeLineNextEndSub
![Page 952: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/952.jpg)
ChartsProperty
ReturnstheChChartscollectionforthespecifiedchartworkspace.
expression.Charts
expressionRequired.AnexpressionthatreturnsaChartSpaceobject.
![Page 953: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/953.jpg)
RemarksBydefault,anewchartworkspacecontainsnocharts.Afteryoucreateanewchartworkspace,youmustaddaChartobjecttoitbeforeyoucancreateachart.UsetheAddmethodtocreateanewchart.
![Page 954: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/954.jpg)
ExampleThisexampleaddsacharttothespecifiedchartworkspace.
Setcht=ChartSpace1.Charts.Add
![Page 955: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/955.jpg)
ChartWrapCountProperty
Returnsorsetsthenumberofchartsthatareplacedhorizontallyorverticallybeforewrappingoccurs.Foramorecompletediscussionoflayoutandwrapping,seetheHelptopicfortheChartLayoutproperty.Read/writeLong.
expression.ChartWrapCount
expressionRequired.AnexpressionthatreturnsaChartSpaceobject.
![Page 956: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/956.jpg)
ExampleThisexamplesetstheChartWrapCountandChartLayoutpropertiesandthenaddssixadditionalchartstothespecifiedchartworkspace.
SubAddCharts()DimchtChartDimchConstantsDimiCtrSetchConstants=ChartSpace1.Constants'Setthechartworkspacesothataroworcolumn'ofchartsiscreatedforeverytwocharts'inthechartworkspace.ChartSpace1.ChartWrapCount=2'Setthechartworkspacesothatthechartsarelaidourhorizontally.'Sincethiscodeaddssixchartstothechartworkspaceandthe'ChrtWrapCountpropertyhasbeensettowrapeverytwocharts,'thenthecoderesultsinthreerowsoftwocharts.ChartSpace1.ChartLayout=chConstants.chChartLayoutHorizontalForiCtr=1To6'Addacharttothechartworkspace.SetchtChart=ChartSpace1.Charts.Add'Enablethecharttitle.chtChart.HasTitle=True'Addatitletothechartthatindicatestheorder'inwhichthechartwascreated.
![Page 957: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/957.jpg)
chtChart.Title.Caption="Chart#"&iCtr'Specifythatthechartistobealinechart.chtChart.Type=chConstants.chChartTypeLineNextEndSub
![Page 958: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/958.jpg)
CheckedProperty
Returnswhetherthespecifiedcommandisenabled.Read-onlyBoolean.
expression.Checked
expressionRequired.AnexpressionthatreturnsanOCCommandobject.
![Page 959: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/959.jpg)
RemarksTheOCCommandId,ChartCommandIdEnum,PivotCommandId,andSpreadsheetCommandIdconstantscontainlistsofthesupportedcommandsforeachWebcomponent.
![Page 960: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/960.jpg)
ChildAxisMembersProperty
ReturnsaPivotAxisMemberscollectionthatrepresentsthechildrenofthespecifiedPivotAxisMemberobject.
expression.ChildAxisMembers
expressionRequired.AnexpressionthatreturnsaPivotAxisMemberobject.
![Page 961: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/961.jpg)
ExampleThisexamplesetsavariabletothetotalamountshippedvia2-Dayshippingtopostalcode28016inNorthCarolina.
SubGet2DayShippingToNC()
DimptDataDimpmRowMemberDimpmColMemberDimpmPageMemberDimpmIntersectionDimdblShipTotal
SetptData=PivotTable1.ActiveData
'Setavariabletoarowfieldmember.SetpmRowMember=ptData.RowAxis.Member.ChildAxisMembers
'Setavariabletoacolumnfieldmember.SetpmColMember=ptData.ColumnAxis.Member.ChildAxisMembers
'Setavariabletoapagefieldmember.SetpmPageMember=ptData.PageAxis.Member.ChildAxisMembers
'Setavariabletotheintersectionoftherow,column,andpagefieldmembers.SetpmIntersection=ptData.CellsEx(pmRowMember,pmColMember,pmPageMember)
'Setavariabletothetotalshippingamountfortheitem.dblShipTotal=pmIntersection.Aggregates("Shipping").Value
EndSub
![Page 962: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/962.jpg)
ChildColumnMembersProperty
ReturnsaPivotColumnMemberscollectionthatrepresentsthechildrenofthespecifiedPivotColumnMemberobject.
expression.ChildColumnMembers
expressionRequired.AnexpressionthatreturnsaPivotColumnMemberobject.
![Page 963: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/963.jpg)
ExampleThisexamplesetsavariabletothetotalamountshippedvia2-Dayshippingtopostalcode28016inNorthCarolina.
SubGet2DayShippingToNC()
DimptDataDimpmRowMemberDimpmColMemberDimpmPageMemberDimpmIntersectionDimdblShipTotal
SetptData=PivotTable1.ActiveData
'Setavariabletoarowfieldmember.SetpmRowMember=ptData.RowAxis.RowMember.ChildRowMembers("NorthCarolina")
'Setavariabletoacolumnfieldmember.SetpmColMember=ptData.ColumnAxis.ColumnMember.ChildColumnMembers
'Setavariabletoapagefieldmember.SetpmPageMember=ptData.PageAxis.PageMember.ChildPageMembers("28016")
'Setavariabletotheintersectionoftherow,column,andpagefieldmembers.SetpmIntersection=ptData.CellsEx(pmRowMember,pmColMember,pmPageMember)
'Setavariabletothetotalshippingamountfortheitem.dblShipTotal=pmIntersection.Aggregates("Shipping").Value
EndSub
![Page 964: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/964.jpg)
ChildLabelProperty
GetsorsetsthevalueoftheIDattributeofthelabelassociatedwithacontrol.Read/writeString.
expression.ChildLabel
expressionRequired.AnexpressionthatreturnsanElementExtensionobject.
![Page 965: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/965.jpg)
ChildMembersProperty
ReturnsaPivotMemberscollectionthatrepresentsthechildmembersofthespecifiedmember.
expression.ChildMembers
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 966: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/966.jpg)
RemarksForinformationaboutreturningasinglememberofacollection,seeReturninganObjectfromaCollection.
![Page 967: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/967.jpg)
ChildPageMembersProperty
ReturnsaPivotPageMemberscollectionthatrepresentsthechildrenofthespecifiedPivotPageMemberobject.
expression.ChildPageMembers
expressionRequired.AnexpressionthatreturnsaPivotPageMemberobject.
![Page 968: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/968.jpg)
ExampleThisexamplesetsavariabletothetotalamountshippedvia2-Dayshippingtopostalcode28016inNorthCarolina.
SubGet2DayShippingToNC()
DimptDataDimpmRowMemberDimpmColMemberDimpmPageMemberDimpmIntersectionDimdblShipTotal
SetptData=PivotTable1.ActiveData
'Setavariabletoarowfieldmember.SetpmRowMember=ptData.RowAxis.RowMember.ChildRowMembers("NorthCarolina")
'Setavariabletoacolumnfieldmember.SetpmColMember=ptData.ColumnAxis.ColumnMember.ChildColumnMembers("2-Day")
'Setavariabletoapagefieldmember.SetpmPageMember=ptData.PageAxis.PageMember.ChildPageMembers
'Setavariabletotheintersectionoftherow,column,andpagefieldmembers.SetpmIntersection=ptData.CellsEx(pmRowMember,pmColMember,pmPageMember)
'Setavariabletothetotalshippingamountfortheitem.dblShipTotal=pmIntersection.Aggregates("Shipping").Value
EndSub
![Page 969: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/969.jpg)
ChildRowMembersProperty
ReturnsaPivotRowMemberscollectionthatrepresentsthechildrenofthespecifiedPivotRowMemberobject.
expression.ChildRowMembers
expressionRequired.AnexpressionthatreturnsaPivotRowMemberobject.
![Page 970: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/970.jpg)
ExampleThisexamplesetsavariabletothetotalamountshippedvia2-Dayshippingtopostalcode28016inNorthCarolina.
SubGet2DayShippingToNC()
DimptDataDimpmRowMemberDimpmColMemberDimpmPageMemberDimpmIntersectionDimdblShipTotal
SetptData=PivotTable1.ActiveData
'Setavariabletoarowfieldmember.SetpmRowMember=ptData.RowAxis.RowMember.ChildRowMembers
'Setavariabletoacolumnfieldmember.SetpmColMember=ptData.ColumnAxis.ColumnMember.ChildColumnMembers("2-Day")
'Setavariabletoapagefieldmember.SetpmPageMember=ptData.PageAxis.PageMember.ChildPageMembers("28016")
'Setavariabletotheintersectionoftherow,column,andpagefieldmembers.SetpmIntersection=ptData.CellsEx(pmRowMember,pmColMember,pmPageMember)
'Setavariabletothetotalshippingamountfortheitem.dblShipTotal=pmIntersection.Aggregates("Shipping").Value
EndSub
![Page 971: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/971.jpg)
ChildSectionProperty
ReturnsaSectionobjectthatrepresentsthechildsectionforthespecifiedsection.Thispropertyfailsifthespecifiedsectionisnotexpanded.
expression.ChildSection
expressionRequired.AnexpressionthatreturnsaSectionobject.
![Page 972: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/972.jpg)
ColorProperty
Returnsorsetstheprimarycolorofthespecifiedobject.Read/writeVariant.
![Page 973: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/973.jpg)
RemarksWhenyousetthisproperty,youcanuseeitheraLongvaluerepresentingared-green-bluecolorvalueoraStringvaluenamingavalidHTMLcolorvalue.Forexample,tosettheobjectcolortored,youcouldusethehexadecimalvalue&HFF,thedecimalvalue255,orthestringvalue"red."InMicrosoftVisualBasic,youcanusetheRGBfunctiontocreateared-green-bluecolorvalue(redisRGB(255,0,0)).ThispropertyalwaysreturnsthecolorasaLongvaluerepresentingared-green-bluecolorvalue.
Oncharts,youcanalsouseeitherofthefollowingtwospecialconstants:chColorAutomatic(toresetthecolortothedefaultvalue)orchColorNone(toindicatenocolor,ortransparency).However,youcannotsetafontcolortochColorNone.
![Page 974: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/974.jpg)
ExampleThisexampleaddsamedium-weightgreenbordertoallcellsintherangeB5:C10onthespreadsheet.
SubSetBorder()
SetssConstants=Spreadsheet1.ConstantsSpreadsheet1.ActiveSheet.Range("b5:c10").Borders.Weight=ssConstants.owcLineWeightMediumSpreadsheet1.ActiveSheet.Range("b5:c10").Borders.Color="green"EndSub
![Page 975: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/975.jpg)
ShowAll
![Page 976: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/976.jpg)
ColorIndexProperty
ColorIndexpropertyasitappliestotheBorderobject.
ColorIndexpropertyasitappliestotheBordersobject.
ColorIndexpropertyasitappliestotheFontobject.
ColorIndexpropertyasitappliestotheInteriorobject.
![Page 977: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/977.jpg)
RemarksThispropertyspecifiesacolorasanindexintotheworkbookcolorpalette.YoucanusetheColorsmethodtoreturnthecurrentcolorpalette.
Thefollowingillustrationshowsthecolor-indexvaluesinthedefaultcolorpalette.
![Page 978: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/978.jpg)
ExampleAsitappliestotheFontobject.
![Page 979: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/979.jpg)
ColorsProperty
Returnsorsetscolorsinthepalettefortheworkbook.Thepalettehas56entries,eachrepresentedbyanRGBvalue.Read/writeVariant.
expression.Colors(Index)
expressionRequired.AnexpressionthatreturnsaWorkbookobject.
IndexOptionalVariant.Thecolornumber(from1to56).Ifthisargumentisn’tspecified,thismethodreturnsanarraythatcontainsall56ofthecolorsinthepalette.
![Page 980: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/980.jpg)
ExampleThisexamplesetscolorfiveinthecolorpalettefortheactiveworkbook.
Spreadsheet1.ActiveWorkbook.Colors(5)=RGB(255,0,0)
ThisexamplecreatesatableontheactiveworksheetinSpreadsheet1thatdisplaystheavailablecolorpalette.
SubCreate_Color_Table()DimavarColorArray()DimiCtrDimrngCurrent
'Setanarrayvariabletothecolorsinthecolorpalette.avarColorArray=Spreadsheet1.ActiveWorkbook.Colors
SetrngCurrent=Spreadsheet1.ActiveSheet.Range("A1")
'Loopthroughallofthecolorsinthearray.ForiCtr=1ToUBound(avarColorArray)rngCurrent.Value="Color"&iCtr
'SetthecolorofacellincolumnBto'theappropriatecolor.rngCurrent.Offset(0,1).Interior.Color_=avarColorArray(iCtr)
SetrngCurrent=rngCurrent.Offset(1,0)NextEndSub
![Page 981: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/981.jpg)
ColumnProperty
Returnsthenumberofthefirstcolumninthespecifiedrange.Read-onlyLong.
expression.Column
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 982: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/982.jpg)
ExampleThisexamplesetsthefonttoboldineveryothercolumnofthevisiblerangeontheactiveworksheet.
SubBoldColumns()Dimcol
ForEachcolInSpreadsheet1.ActiveSheet.VisibleRange.ColumnsIfcol.ColumnMod2=0Thencol.Font.Bold=TrueNextEndSub
![Page 983: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/983.jpg)
ColumnAxisProperty
PivotDataobject:ReturnsaPivotResultColumnAxisobjectthatrepresentsthecolumnaxisinthespecifiedPivotTablelist.
PivotViewobject:ReturnsaPivotGroupAxisobjectthatrepresentsthecolumnaxisinthespecifiedPivotTablelist.
expression.ColumnAxis
expressionRequired.AnexpressionthatreturnsaPivotDataorPivotViewobject.
![Page 984: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/984.jpg)
ExampleThisexampleinsertstwofieldsetsintothePivotTablelistintheactiveview.
SubAddFieldsToPT()
DimptView
SetptView=PivotTable1.ActiveView
ptView.ColumnAxis.InsertFieldSetptView.FieldSets("StoreType")
ptView.RowAxis.InsertFieldSetptView.FieldSets("Promotions")
EndSub
![Page 985: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/985.jpg)
ColumnHeadingsProperty
ReturnsaHeadingscollectionthatrepresentsthecolumnheadingsinthespecifiedwindow.UsetheCaptionpropertytocustomizethecolumnheadings.
expression.ColumnHeadings
expressionRequired.AnexpressionthatreturnsaWindowobject.
![Page 986: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/986.jpg)
ExampleThisexamplesetsthecreatesacustomdataentrysheetbydisablingsomeuserinterfaceelements,limitingtheviewablerangeintheactivewindow,andcustomizingtherowandcolumnheadings.
SubCreate_Datasheet()DimhdrColHeadingsDimhdrRowHeadingsDimwndActive
SetwndActive=Spreadsheet1.ActiveWindow
'HidevariousUIelements.wndActive.DisplayWorkbookTabs=FalseSpreadsheet1.DisplayToolbar=False
'Displaythetitlebarandsetit'scaption.Spreadsheet1.DisplayTitleBar=TrueSpreadsheet1.TitleBar.Caption="RevenueWorksheet"
'Resizethespreadsheetcomponent.Spreadsheet1.AutoFit=True
'Limittheviewablerangeoftheactivesheet.wndActive.ViewableRange="A1:D5"
'Setavariabletothecolumnheadingsintheactivewindow.SethdrColHeadings=wndActive.ColumnHeadings
'Setavariabletotherowheadingsintheactivewindow.SethdrRowHeadings=wndActive.RowHeadings
![Page 987: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/987.jpg)
'SettheheadingsofcolumnsAthroughD.hdrColHeadings(1).Caption="Qtr1"hdrColHeadings(2).Caption="Qtr2"hdrColHeadings(3).Caption="Qtr3"hdrColHeadings(4).Caption="Qtr4"
'Settheheadingsofrows1though5.hdrRowHeadings(1).Caption="1996"hdrRowHeadings(2).Caption="1997"hdrRowHeadings(3).Caption="1998"hdrRowHeadings(4).Caption="1999"hdrRowHeadings(5).Caption="2000"EndSub
![Page 988: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/988.jpg)
ColumnMemberProperty
ReturnsaPivotColumnMemberobjectthatrepresentstheinnermostmemberonthecolumnaxisthatintersectsthespecifiedcell.
expression.ColumnMember
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 989: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/989.jpg)
ColumnMembersProperty
ReturnsaPivotColumnMemberscollectionthatrepresentsallthemembersofthespecifiedcolumn.
expression.ColumnMembers
expressionRequired.AnexpressionthatreturnsaPivotRangeobject.
![Page 990: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/990.jpg)
RemarksThecollectionofcolumnmembersdoesnotincludeanymembersthatyouhavefilteredbysettingtheirIsFilteredpropertytoTrue.
![Page 991: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/991.jpg)
ShowAll
![Page 992: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/992.jpg)
ColumnsProperty
ColumnpropertyasitappliestotheRangeobject.
ColumnpropertyasitappliestotheSpreadsheetandWorksheetobjects.
![Page 993: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/993.jpg)
ExampleAsitappliestotheRangeobject.
AsitappliestotheWorksheetobject.
![Page 994: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/994.jpg)
ColumnWidthProperty
Returnsorsetsthewidthofallcolumnsinthespecifiedrange.ReturnsNullifthecolumnsintherangearenotallthesamewidth.UsetheIsNullfunctiontodeterminewhetherthereturnvalueisNull.Read/writeVariant.
expression.ColumnWidth
expressionRequired.AnexpressionthatreturnsaRangeobject.
![Page 995: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/995.jpg)
ExampleThisexamplesetstheformula,columnwidth,andnumberformatforallthecellsintherangeA1:F10ontheactiveworksheet.
SubFormat_Sheet1()DimrngCurrentSetrngCurrent=Spreadsheet1.ActiveSheet.Range("A1:F10")rngCurrent.Formula="=rand()"rngCurrent.ColumnWidth=10rngCurrent.NumberFormat="#.###"EndSub
![Page 996: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/996.jpg)
CommandsProperty
ReturnsanOCCommandsobjectthatrepresentsthecollectionofcommandsavailable.
expression.Commands
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 997: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/997.jpg)
CommandTextProperty
Returnsorsetsthecommandstringforthespecifiedobject.Read-onlyStringfortheRecordsetDefandSchemaRowsourceobjects;read/writeStringforallotherobjectsintheAppliesTolist.
expression.CommandText
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 998: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/998.jpg)
RemarksFortypedscCommandText,thispropertyreturnsorsetsatextstring(usuallySQL)thatreturnsasingleresultsetfromtheprovider.
FortypedscCommandFile,thispropertyreturnsorsetstheURLofanXMLfilecontainingdataforthespecifiedSchemaRowsourceobject.
![Page 999: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/999.jpg)
ShowAll
![Page 1000: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1000.jpg)
CompareMemberCaptionsByProperty
ReturnsorsetsaPivotMembersCompareByEnumconstantthatdetermineshowthePivotTablecontrolcomparesmembercaptionstothelistofcustomcaptionssetbytheMemberCaptionsproperty.CaptionsthatmatchthecustomlistestablishedbytheMemberCaptionspropertyarerenamedusingthecustomcaption.Read/write.
expression.CompareMemberCaptionsBy
expressionRequired.AnexpressionthatreturnsaPivotFieldSetobject.
![Page 1001: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1001.jpg)
RemarksThedefaultsettingwhenthespecifiedfieldsetisatime-basedfieldisplMembersCompareByName.Otherwise,thedefaultsettingisplMembersCompareByUniqueName.
![Page 1002: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1002.jpg)
ShowAll
![Page 1003: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1003.jpg)
CompareOrderedMembersByProperty
ReturnsorsetsaPivotMembersCompareByEnumconstantthatdetermineshowthePivotTablecontrolsortsmembersofthespecifiedfieldsetwhenacustomsortorderhasbeenestablishedbytheOrderedMembersproperty.Read/write.
expression.CompareOrderedMembersBy
expressionRequired.AnexpressionthatreturnsaPivotFieldSetobject.
![Page 1004: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1004.jpg)
RemarksThedefaultsettingwhenthespecifiedfieldsetisatime-basedfieldisplMembersCompareByName.Otherwise,thedefaultsettingisplMembersCompareByUniqueName.
![Page 1005: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1005.jpg)
ConnectionProperty
ReturnsorsetstheADOConnectionobjectusedbythespecifiedobject.Read/writeforthePivotTableobject;read-onlyfortheDataSourceControlandDSCEventInfoobjects.
expression.Connection
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1006: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1006.jpg)
RemarksUsecautionwhencallingmethodsorsettingpropertiesfortheConnectionobjectreturnedbythisproperty.Forexample,youshouldnotcalltheConnectionobject'sClosemethod.
ImportantForinformationaboutsecuredataconnections,seeMakingConnectionstoExternalDataSourcesMoreSecure.
![Page 1007: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1007.jpg)
ConnectionFileProperty
ReturnsorsetsaStringthatspecifiestheOfficeDatabaseConnection(.odc)orMicrosoftDataLink(.udl)filethatisusedtoconnectthedataaccesspagetoadatasource.Read/write.
expression.ConnectionFile
expressionRequired.AnexpressionthatreturnsaDataSourceControlobject.
![Page 1008: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1008.jpg)
ExampleThisexampleconnectsthedataaccesspagetoaOfficeDatabaseConnectionfilenamed"SQLNorthwind.odc".
MSODSC.ConnectionFile="SQLNorthwind.odc"
![Page 1009: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1009.jpg)
ConnectionStringProperty
ReturnsorsetstheADOconnectionstringforatwo-tierdatabaseconnection.Read/writeString.
expression.ConnectionString
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1010: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1010.jpg)
RemarksWiththedatasourcecontrol,thispropertyisequivalenttoCurrentProject.BaseConnectionStringinMicrosoftAccess.Whenthedatasourcecontrolcreatesaconnection,thevalueofthedatasourcecontrolConnectionStringpropertymaynotbethesameasthevaluereturnedbytheConnectionStringpropertyoftheConnectionobjectbecausethedatasourcecontrolusesotherOLEDBproviderstosupplyadditionalservices.Forexample,onanHTMLpagecontainingadatasourcecontrolwithID"MSODSC"thefollowingexpressionsmaynotbeequivalent.
ImportantForinformationaboutsecuredataconnections,seeMakingConnectionstoExternalDataSourcesMoreSecure.
MSODSC.ConnectionStringMSODSC.Connection.ConnectionString
![Page 1011: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1011.jpg)
ExampleThisexampleestablishesaconnectiontoadatabase,queriesthedata,andthenaddsfieldstoPivotTable1whentheWebpagecontainingthePivotTable1isloaded.
SubWindow_OnLoad()
DimsConnStrDimptView'Setavariabletotheconnectionstring.sConnStr="Provider=sqloledb;DataSource=DataServer;InitialCatalog=Testing;IntegratedSecurity=SSPI;"'SettheconnectionstringPivotTable1.ConnectionString=sConnStr
'ReturnalldatafromtheSpendingtable.PivotTable1.CommandText="Select*fromSpending"SetptView=PivotTable1.ActiveView'Thefollowingfourlinesofcodeaddfieldstotherowareaanddata'areasofthePivotTablelist.ptView.RowAxis.InsertFieldSetptView.FieldSets("Project")ptView.RowAxis.InsertFieldSetptView.FieldSets("Year")ptView.DataAxis.InsertFieldSetptView.FieldSets("Budget")ptView.DataAxis.InsertFieldSetptView.FieldSets("Actual")
EndSub
![Page 1012: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1012.jpg)
ConstantsProperty
Returnsanobjectthatallowsscriptuserstousenamedconstants.Read-only.
Formoreinformation,seeUsingNamedConstantsinVBScript.
ThispropertyisrequiredonlyonHTMLpages.Inothercontainers(suchasVisualBasic),youcanusedefinedconstantsfromtheobjectmodeldirectly,withoutfirstusingtheConstantsproperty.UsingtheConstantspropertyinothercontainerswillworkbutisnotrecommended,asitwillcauseyourcodetorunsignificantlyslower.
expression.Constants
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1013: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1013.jpg)
ExampleThisexampleaddsamedium-weightgreenbordertoeachcellintherangeB5:C10onthespreadsheet.BecausenamedconstantsarenotavailableinVBScript,theexamplesetsavariabletotheobjectreturnedbytheConstantsproperty.
SubSetBorder()DimssConstants'SetavariabletotheconstantsoftheSpreadsheetcomponent.SetssConstants=Spreadsheet1.Constants'Settheborderweight.Spreadsheet1.Range("b5:c10").Borders.Weight=ssConstants.owcLineWeightMedium'Setthebordercolor.Spreadsheet1.Range("b5:c10").Borders.Color="green"EndSub
![Page 1014: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1014.jpg)
ConsumesRecordsetProperty
Trueforcomplexcontrolsifdataissuppliedbythedatasourcecontrol.Anydata-boundcontrolhaseitheraControlSourceproperty(usedwithasimpleHTMLcontrol)oraConsumesRecordsetproperty(usedwithacomplexcontrolsuchasaPivotTablelistorchartworkspace).Read/writeBoolean.
expression.ConsumesRecordset
expressionRequired.AnexpressionthatreturnsanElementExtensionobject.
![Page 1015: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1015.jpg)
ControlProperty
ReturnsaPivotTableobjectthatrepresentsthePivotTablelistforthespecifiedPivotDataorPivotViewobject.
expression.Control
expressionRequired.AnexpressionthatreturnsaPivotDataorPivotViewobject.
![Page 1016: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1016.jpg)
ControlSourceProperty
Returnsorsetsthenameofthecontroltowhichthespecifiedcontrolisbound.Read/writeString.
expression.ControlSource
expressionRequired.AnexpressionthatreturnsanElementExtensionobject.
![Page 1017: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1017.jpg)
RemarksThispropertyreturnsorsetsthevaluesoftheNameandSourcepropertiesforthefieldtowhichthespecifiedcontrolisbound.Thepropertyvaluesarereturnedasastringinthefollowingformat:"PageField.Name:PageField.Source"wherethestringsinitalicsarereplacedwiththeactualvaluesoftheNameandSourceproperties.IftheNameandSourcepropertyvaluesareidentical,onlyonevalueisreturned.
Ifyousetthispropertytothenameofaschemafieldinaschemarowsourceusedbythesectioncontainingthespecifiedcontrol,theschemafieldisautomaticallyaddedasapagefield.
![Page 1018: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1018.jpg)
CountProperty
Returnsthenumberofobjectsinthespecifiedcollection.Read-onlyLong.
expression.Count
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1019: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1019.jpg)
ExampleThisexamplesetsvariablestothenumberofcolumnsandthenumberofrowsinthevisiblerangeontheactiveworksheet,andthenformatsthecolorofthecellsineveryotherrow.
SubFormat_Odd_Rows()DimrngUsedDimiUsedRowsDimiUsedColumnsDimshtActiveDimiCtrSetshtActive=Spreadsheet1.ActiveSheet'Setavariableottheusedrangeoftheactivesheet.SetrngUsed=shtActive.UsedRange'Getthecountofusedrowsintheactivesheet.iUsedRows=rngUsed.Rows.Count'Getthecountofusedcolumnsintheactivesheet.iUsedColumns=rngUsed.Columns.Count'Loopthrougheveryoddrowintheusedrange.ForiCtr=1ToiUsedRowsStep2'Colorthebackgroundofthecellsgreen.shtActive.Range(shtActive.Cells(iCtr,1),shtActive._Cells(iCtr,iUsedColumns)).Interior.ColorIndex=43NextEndSub
![Page 1020: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1020.jpg)
![Page 1021: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1021.jpg)
CriteriaProperty
ReturnstheCriteriaobjectforthespecifiedfilter.UsetheAddmethodoftheCriteriaobjectreturnedbythispropertytoaddcriteriatoaFilterobject.Read-only.
expression.Criteria
expressionRequired.AnexpressionthatreturnsaFilterobject.
![Page 1022: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1022.jpg)
ExampleThisexampleturnsontheAutoFilterfortherangeA1:C20,setsfiltersforcolumnsAandC,andthenappliesthefilters.
SubApply_AutoFilter()DimafFiltersDimafCol1DimafCol3
'TurnonAutoFilter.Spreadsheet1.Worksheets("Sheet1").Range("A1:C20").AutoFilter
'SetavariabletotheAutoFilterobjectSetafFilters=Spreadsheet1.Worksheets("sheet1").AutoFilter
SetafCol1=afFilters.Filters(1)SetafCol3=afFilters.Filters(3)
'AddacriteriathatexcludesbluefromcolumnA.afCol1.Criteria.Add"blue"
'AddacriteriathatexcludesgreenfromcolumnA.afCol1.Criteria.Add"green"
'Addacriteriathatexcludesyellowfromcolumnc.afCol3.Criteria.Add"yellow"
'ApplythecriteriaafFilters.ApplyEndSub
![Page 1023: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1023.jpg)
ShowAll
![Page 1024: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1024.jpg)
CrossesProperty
Returnsorsetsavaluethatindicateshowthespecifiedaxiscrossesanotheraxis.Read/writeChartAxisCrossesEnum.
expression.Crosses
expressionRequired.AnexpressionthatreturnsaChAxisobject.
![Page 1025: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1025.jpg)
ExampleThisexamplesetsthecategoryaxistocrossthevalueaxisatvaluezero(0)inthechartworkspaceifacustomcrossingpointhasnotalreadybeensetforthecategoryaxis.
SubFormat_Axis()DimchConstantsDimaxValueAxisDimaxCategoryAxis
SetchConstants=ChartSpace1.ConstantsSetaxValueAxis=ChartSpace1.Charts(0).Axes(chConstants.chAxisPositionValue)SetaxCategoryAxis=ChartSpace1.Charts(0).Axes(chConstants.chAxisPositionCategory)IfaxCategoryAxis.Crosses=chConstants.chAxisCrossesAutomaticThenaxValueAxis.CrossingAxis=axCategoryAxisaxCategoryAxis.CrossesAtValue=0EndIf
EndSub
![Page 1026: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1026.jpg)
CrossesAtValueProperty
Returnsorsetsthecrossingpointforthespecifiedaxis.Whenyousetthisvalueforanaxis,youaresettingthevalueontheotheraxiswheretheaxisyouaresettingwillcrossthatotheraxis.Forexample,settingthispropertyonthevalue(y)axissetsthecategorynumberwherethevalueaxiswillcrossthecategory(x)axis.Read/writeDouble.
expression.CrossesAtValue
expressionRequired.AnexpressionthatreturnsaChAxisobject.
![Page 1027: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1027.jpg)
ExampleThisexamplesetsthecategoryaxistocrossthevalueaxisatvaluezero(0)inthechartworkspace.
SubSetCrossingValue()DimchConstantsDimaxValueAxisDimaxCategoryAxisSetchContants=ChartSpace1.ConstantsSetaxValueAxis=ChartSpace1.Charts(0).Axes(chConstants.chAxisPositionValue)SetaxCategoryAxis=ChartSpace1.Charts(0).Axes(chConstants.chAxisPositionCategory)axValueAxis.CrossingAxis=axCategoryAxisaxCategoryAxis.CrossesAtValue=0EndSub
Thefollowingexamplecausesthevalueaxistocrossthecategoryaxisatthethirdcategory.
SubSetCrossingCategory()DimchConstantsSetchConstants=ChartSpace1.ConstantsChartSpace1.Charts(0).Axes(chConstants.chAxisPositionLeft).CrossesAtValueEndSub
![Page 1028: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1028.jpg)
CrossingAxisProperty
Returnsorsetsthecrossingaxis.Ifthespecifiedaxisisdeleted,thispropertyissettoNull,andtheCrossespropertyisresettochAxisCrossesAutomatic.Read/writeChAxis.
expression.CrossingAxis
expressionRequired.AnexpressionthatreturnsaChAxisobject.
![Page 1029: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1029.jpg)
ExampleThisexamplesetsthecategoryaxistocrossthevalueaxisatvaluezero(0)inthechartworkspace.
SubSetCrossingValue()DimchConstantsDimaxValueAxisDimaxCategoryAxisSetchtContants=ChartSpace1.ConstantsSetaxValueAxis=ChartSpace1.Charts(0).Axes(chConstants.chAxisPositionValue)SetaxCategoryAxis=ChartSpace1.Charts(0).Axes(chConstants.chAxisPositionCategory)axValueAxis.CrossingAxis=axCategoryAxisaxCategoryAxis.CrossesAtValue=0EndSub
![Page 1030: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1030.jpg)
CSVDataProperty
Returnsorsetsspreadsheetdataasacomma-delimitedlist.Read/writeString.
expression.CSVData
expressionRequired.AnexpressionthatreturnsaSpreadsheetobject.
![Page 1031: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1031.jpg)
ExampleThisexamplesetsthevaluesforcellsA1:G1.
Spreadsheet1.CSVData="1,1,2,3,5,8,13"
![Page 1032: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1032.jpg)
CSVURLProperty
ReturnsorsetstheURL(Internetaddress)forthecomma-delimitedspreadsheetdatafile.Read/writeString.
expression.CSVURL
expressionRequired.AnexpressionthatreturnsaSpreadsheetobject.
![Page 1033: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1033.jpg)
ExampleThisexamplesetsspreadsheetdatafromafileontheuser'scomputer.
Spreadsheet1.CSVURL="file:\test.csv"
![Page 1034: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1034.jpg)
CurrentArrayProperty
Ifthespecifiedcellispartofanarray,returnsaRangeobjectthatrepresentstheentirearray.Resultsinarun-timeerrorifthespecifiedcellisnotpartofanarray.Read-only.
expression.CurrentArray
expressionRequired.AnexpressionthatreturnsaRangeobject.
![Page 1035: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1035.jpg)
RemarksUsetheHasArraypropertytodeterminewhetherornotacellispartofanarray.
![Page 1036: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1036.jpg)
ExampleAssumingthattheactivecellispartofanarray,thisexampleselectsthearray.
Spreadsheet1.ActiveCell.CurrentArray.Select
![Page 1037: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1037.jpg)
CurrentCellProperty
ReturnsaPivotCellobjectthatcontainsthedetailcellthatiscurrentlybeingedited.
expression.CurrentCell
expressionRequired.AnexpressionthatreturnsaPivotDataobject.
![Page 1038: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1038.jpg)
RemarksThispropertyisrelevantonlywhenthePivotTablelistisconnectedtoarelationaldatasource.
![Page 1039: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1039.jpg)
CurrentRegionProperty
ReturnsaRangeobjectthatrepresentsthecurrentregion.Thecurrentregionisarangeboundedbyanycombinationofblankrowsandblankcolumns.Read-only.
expression.CurrentRegion
expressionRequired.AnexpressionthatreturnsaRangeobject.
![Page 1040: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1040.jpg)
ExampleThefunctioninthisexamplereturnsTrue,iftheentirecurrentregionforcellA1ontheactiveworksheetisvisible(ifthecurrentregionextendsoutsidethevisiblerange,thefunctionreturnsFalse).
FunctionIsCurrentRegionVisible()DimrngCurrentDimrngVisibleDimrngIntersect
'SetthevaribletothecurrentregionofcellA1.SetrngCurrent=Spreadsheet1.ActiveSheet.Cells(1,1).CurrentRegion
'Setavariabletothecurrentlyvisiblerange.SetrngVisible=Spreadsheet1.ActiveWindow.VisibleRange'Setavariabletotheoverlappingportionofthecurrentregion'andthevisiblerange.SetrngIntersect=Spreadsheet1.RectIntersect(rngCurrent,rngVisible)
'Iftheoverlappingregionisthesameasthecurrentregion,then'returntrue.IsCurrentRegionVisible=(rngIntersect.Address=rngCurrent.Address)EndFunction
![Page 1041: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1041.jpg)
CurrentSectionProperty
ReturnsaSectionobjectthatrepresentsthecurrentsection(thesectioncontainingthecontrolthatcurrentlyhasthefocus).
expression.CurrentSection
expressionRequired.AnexpressionthatreturnsaDataSourceControlobject.
![Page 1042: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1042.jpg)
CustomGroupMembersProperty
ReturnsaPivotMemberscollectionthatrepresentsthemembersofacustomgroupfield.
expression.CustomGroupMembers
expressionRequired.AnexpressionthatreturnsaPivotFieldobject.
![Page 1043: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1043.jpg)
ShowAll
![Page 1044: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1044.jpg)
CustomGroupTypeProperty
ReturnsaPivotMemberCustomGroupTypeEnumconstantthatrepresentsthetypeofgroupthatthespecifiedmemberisincludedin.Read-only.
expression.CustomGroupType
expressionRequired.AnexpressionthatreturnsaPivotAxisMemberobject.
![Page 1045: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1045.jpg)
ShowAll
![Page 1046: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1046.jpg)
DashStyleProperty
ReturnsorsetsaChartLineDashStyleEnumconstantindicatingthedashstyleforthespecifiedlineorborder.Read/write.
expression.DashStyle
expressionRequired.AnexpressionthatreturnsaChLineorChBorderobject.
![Page 1047: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1047.jpg)
RemarksThispropertyisvalidonlyforserieslines.
![Page 1048: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1048.jpg)
ExampleThisexamplechangesthefirstchartinChartspace1toalinechartandthenformatsthelineforthefirstdataseriesinthechart.
SubSet_Series_LineStyle()
DimchConstantsDimserSeries1
SetchConstants=ChartSpace1.Constants
'Changethecharttoalinechart.ChartSpace1.Charts(0).Type=chChartTypeLine
'Setavariabletorefertothefirstdataseriesinthechart.SetserSeries1=ChartSpace1.Charts(0).SeriesCollection(0)
'Setthemiterofthelineofthefirstseries.serSeries1.Line.Miter=chConstants.chLineMiterBevel
'Setthelineweightofthefirstseries.serSeries1.Line.Weight=chConstants.owcLineWeightThick
'Setthelinestyleofthefirstseries.serSeries1.Line.DashStyle=chConstants.chLineRoundDot
EndSub
![Page 1049: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1049.jpg)
DataProperty
ReturnsaPivotDataobjectthatrepresentsthesourcedataforthePivotTablelist.
expression.Data
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1050: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1050.jpg)
DataAxisProperty
ReturnsaPivotDataAxisobjectthatrepresentsthedataaxis.UsethePivotDataAxisobjectreturnedbythispropertytoinsertfieldsandtotalsonthedataaxisofaPivotTablelist.Read-only.
![Page 1051: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1051.jpg)
ExampleThisexampleaddsatotaltothePivotTablelistintheactiveviewandinsertsafieldsetonthedataaxis.
SubInsertTotal()DimptViewDimptConstantsDimtotNewtotalSetptView=PivotTable1.ActiveViewSetptConstants=PivotTable1.Constants
SettotNewTotal=view.AddTotal("myTotal",view.FieldSets("Freight").Fields(0),_ptConstants.plFunctionSum)ptView.DataAxis.InsertTotaltotNewTotalptView.DataAxis.InsertFieldSetptView.FieldSets("OrderDate")EndSub
![Page 1052: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1052.jpg)
DataBodyRangeProperty
ReturnsthedataboundrowsfromaspecifiedListObjectobjectasaRangeobject.Read-onlyRange.
expression.DataBodyRange
expressionRequired.AnexpressionthatreturnsaListObjectobject.
![Page 1053: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1053.jpg)
Remarks
SomeRangepropertiesandmethodsarenotsupported.ThepropertiesnotsupportedareLocked,MergeAreaandMergeCells.ThemethodsnotsupportedareDelete,Insert,Merge,andUnMerge.TheDataBodyRangedoesnotincludetheHeaderRowRangeproperty(theheaderrowabovethedataboundrows)ortheInsertRowRangeproperty(theinsertrowbelowthedataboundrows).
Notethatifyouwanttosetcolorsonrows,youcanonlydosoonentirerowswithintheXMLlist.Youcannotsetthecoloroftheinsertrow.
![Page 1054: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1054.jpg)
ExampleThisexamplesetstheinteriorcoloroftheDataBodyRangeofaListObjectobjecttoyellowandthebordercolortored.
DimrngDataBody'Setavariabletothedatabodyrange.SetrngDataBody=Spreadsheet1.ActiveSheet.ListObjects(1).DataBodyRange'Settheinteriorcolorandthebordercolorofthedatabodyrange.WithrngDataBody.Interior.ColorIndex=6.Borders.ColorIndex=3EndWith
![Page 1055: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1055.jpg)
DataEntryProperty
Trueifthespecifiedpageisusedonlyfordataentry(Falseifthepageincludesapopulatedrecordset).ThedefaultvalueisFalse.Read/writeBoolean.
expression.DataEntry
expressionRequired.AnexpressionthatreturnsaDataSourceControlobject.
![Page 1056: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1056.jpg)
DataFieldProperty
ReturnsthenameofthefieldthatthePivotFieldobjectisboundtoifthedataiscomingfromarecordset.Read-onlyString.
expression.DataField
expressionRequired.AnexpressionthatreturnsaPivotFieldobject.
![Page 1057: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1057.jpg)
DataLabelProperty
ReturnsaChDataLabelobjectthatrepresentsthedatalabelassociatedwiththespecifiedtrendline.Read-only.
expression.DataLabel
expressionRequired.AnexpressionthatreturnsaChTrendlineobject.
![Page 1058: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1058.jpg)
ExampleThisexampleaddsatrendlinetothespecifiedseriesinthechartworkspace,setsthefontforthedatalabeltobold,andcausesthetrendlinetodisplayonlyitsequation(theR-squaredvalueisnotdisplayed).
SubAddTrendLine()Dimtrndline
'AddatrendlinetothefirstseriesinthefirstchartinChartSpace1.Settrndline=ChartSpace1.Charts(0).SeriesCollection(0).Trendlines.Add
'Setthefontofthetrendlinetobold.trndline.DataLabel.Font.Bold=True
'DonotdisplaytheR-Squaredvaluewiththetrendline.trndline.IsDisplayingRSquared=False
'Displaytheequationforthetrendline.trndline.IsDisplayingEquation=TrueEndSub
![Page 1059: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1059.jpg)
DataLabelsCollectionProperty
ReturnsaChDataLabelsCollectionobjectthatcontainsthedatalabelsforthespecifiedseries.Eachseriescancontainonlyonesetofdatalabels.Read-only.
Formoreinformationaboutreturningasinglememberofacollection,seeReturninganObjectfromaCollection.
expression.DataLabelsCollection
expressionRequired.AnexpressionthatreturnsaChSeriesobject.
![Page 1060: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1060.jpg)
ExampleThisexampleaddsdatalabelstothespecifiedseriesinthechartworkspace.
ChartSpace1.Charts(0).SeriesCollection(0).DataLabelsCollection.Add
Thisexamplesetsthefontforthedatalabelsforthespecifiedseries.
ChartSpace1.Charts(0).SeriesCollection(0).DataLabelsCollection(0).Font.Bold=True
![Page 1061: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1061.jpg)
DataMemberProperty
Returnsorsetsthedatamembername(thenameoftherecordsetthatthespecifiedcontrolwillrequestfromthedatasource).Read/writeDataMember.
expression.DataMember
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1062: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1062.jpg)
DataPageProperty
ReturnsaDataPageobjectthatrepresentsthedataaccesspageforthespecifiedsection.
expression.DataPage
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1063: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1063.jpg)
RemarksAdatapageisaclusterofsectionsthatshareacommonrecordnavigationcontrol.
![Page 1064: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1064.jpg)
DataPagesProperty
ReturnstheDataPagescollectionforthedatasourcecontrol.
expression.DataPages
expressionRequired.AnexpressionthatreturnsaDataSourceControlobject.
![Page 1065: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1065.jpg)
DataPageSizeProperty
Returnsorsetsthenumberofrecordsshownforthespecifiedbandinglevelonadataaccesspage.Thedefaultvalueis5forabandedpageand1foranon-bandedpage.Read/writeLong.
expression.DataPageSize
expressionRequired.AnexpressionthatreturnsaGroupLevelobject.
![Page 1066: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1066.jpg)
DataSourceProperty
ReturnsorsetstheADODataSourceobjectthatrepresentsthedatasourceforthespecifiedcontrol.
expression.DataSource
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1067: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1067.jpg)
ExampleThisexamplecreatesachartthatisboundtoaspreadsheet.TheseriesnameisincellB1,thecategorynamesareincellsA2:A28,andthevaluesareincellsB2:B28.
Setc=ChartSpace1.ConstantsSetChartSpace1.DataSource=Spreadsheet1.ObjectChartSpace1.Charts.AddChartSpace1.Charts(0).Type=c.chChartTypeLineMarkersChartSpace1.Charts(0).SetDatac.chDimCategories,0,"a2:a28"ChartSpace1.Charts(0).SetDatac.chDimSeriesNames,0,"b1"ChartSpace1.Charts(0).SeriesCollection(0).SetDatac.chDimValues,0,"b2:b28"
![Page 1068: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1068.jpg)
DataSourceNameProperty
ReturnsorsetsaStringspecifyingthenameoftheActiveXcontrolthatservesasthedatasourceforthechartcontrol.ThispropertycanbeusedincontainersthatsupporttheMicrosoftInternetExplorerDocumentObjectModel.Read/write.
expression.DataSourceName
expressionRequired.AnexpressionthatreturnsaChartSpaceobject.
![Page 1069: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1069.jpg)
ExampleThisexampleestablishesPivotTable1asthedatasourceforChartspace1andthendisplaysthefieldlistsothattheusercanadddatatothechart.
SubConnectChart()
'BindChartSpace1toPivotTable1.Chartspace1.DataSourceName="PivotTable1"
'Displaythefieldlist.Chartspace1.DisplayFieldList=True
EndSub
![Page 1070: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1070.jpg)
ShowAll
![Page 1071: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1071.jpg)
DataSourceTypeProperty
Returnsorsetsthedatasourcetypeforthespecifiedchartworkspace.Read-onlyChartDataSourceTypeEnum.
expression.DataSourceType
expressionRequired.AnexpressionthatreturnsaChartSpaceobject.
![Page 1072: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1072.jpg)
ShowAll
![Page 1073: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1073.jpg)
DataTypeProperty
DataTypepropertyasitappliestotheSchemaFieldandSchemaParameterobjects.
DataTypepropertyasitappliestothePivotFieldobject.
DataTypepropertyasitappliestotheSpreadsheetobject.
![Page 1074: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1074.jpg)
DefaultColorProperty
ReturnsaRGB-packedintegerthatrepresentsthespecifiedfillcolorwhentheColorpropertyischColorAutomatic.Read-onlyVariant.
expression.DefaultColor
expressionRequired.AnexpressionthatreturnsaChInteriorobject.
![Page 1075: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1075.jpg)
ShowAll
![Page 1076: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1076.jpg)
DefaultControlTypeProperty
Returnsorsetsthedefaultcontroltypeforthespecifieddatasourcecontrol.Read/writeDefaultControlTypeEnum.
expression.DefaultControlType
expressionRequired.AnexpressionthatreturnsaDataSourceControlobject.
![Page 1077: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1077.jpg)
DefaultMemberProperty
ReturnsaPivotMemberobjectthatrepresentsthedefaultmemberforthespecifiedfieldset.
expression.DefaultMember
expressionRequired.AnexpressionthatreturnsaPivotFieldSetobject.
![Page 1078: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1078.jpg)
RemarksThispropertyisvalidonlywhenthePivotTablelistisconnectedtoanOLAPdatasource.
ThedefaultmemberisusuallyAlloroneofthetopmembersinthedimension.
![Page 1079: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1079.jpg)
DefaultQueryOnLoadProperty
WhenthispropertyissettoTrue,bindingsthathaveaPurposeattributewiththevalue"Query"andaLoadModeattributewiththevalue"Normal"willrefreshwhenthepageloads.WhensettoFalse,nobindingsarerefreshedwhenthepageisloaded.Read/write.
expression.DefaultQueryOnLoad
expressionRequired.AnexpressionthatreturnsaSpreadsheetobject.
![Page 1080: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1080.jpg)
Remarks
AnXmlDataBindingobjectcanbeabindingtoanXMLfile,aSOAPservice,anotherWebPart(onlywhenbindingfromaSpreadsheetWebPart),oradataretrievalservice.
ThedefaultvaluefortheDefaultQueryOnLoadpropertyisTrue.ThePurposeattributeisinthedataretrievalserviceconnectionbindingdetailcontainedinthe<DataSource>elementintheXMLSpreadsheetfile(Binding/DataSource/ConnectionInfo@Purpose).TheLoadModeattributeisinthe<Binding>element.TheXMLfragmentwherethesedetailsappearintheXMLSpreadsheetfilelookssomethinglikefollowing:
<x2:Bindingx2:ID="Cust_bind_id"x2:LoadMode="Normal"x2:Async="False"><x2:MapID>Cust_MapId</x2:MapID><udc:DataSourceMajorVersion="1"MinorVersion="0"><udc:TypeType="XMLFile"MajorVersion="1"MinorVersion="0"/><udc:Name>sample_name</udc:Name><udc:ConnectionInfoPurpose="Query">
![Page 1081: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1081.jpg)
DefaultRecordsetProperty
ReturnsthedefaultADORecordsetobjectforthespecifiedcontrol.Read-only.
expression.DefaultRecordset
expressionRequired.AnexpressionthatreturnsaDataSourceControlobject.
![Page 1082: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1082.jpg)
RemarksYoushouldnotusethispropertywithsectionsthatareboundtorecordsets;instead,usetheDataPageobject'sRecordsetproperty.
![Page 1083: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1083.jpg)
DefaultSortProperty
Returnsorsetsthefield(orfields)onwhichthespecifiedbandinglevelissorted.Thefieldmustbepartofthebandinglevel.Ifyouusethispropertytospecifymultiplefields,usecommastoseparatethefields.Read/writeString.
expression.DefaultSort
expressionRequired.AnexpressionthatreturnsaGroupLevelobject.
![Page 1084: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1084.jpg)
DefaultValueProperty
Returnsorsetsthevaluethatisplacedinthespecifiedcontrolwhenevertheusercreatesanewrecord.Appliestoanyboundcontrol,anycontrolwithaValueproperty,oranycontrolthatmeetsbothofthesecriteria.Read/writeStringfortheElementExtensionobject;read/writeVariantforthePivotFieldobject.
expression.DefaultValue
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1085: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1085.jpg)
DesignModeProperty
Trueifthespreadsheetcontroliscurrentlyindesignmode.Read-onlyBoolean.
expression.DesignMode
expressionRequired.AnexpressionthatreturnsaSpreadsheetobject.
![Page 1086: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1086.jpg)
ShowAll
![Page 1087: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1087.jpg)
DetailAutoFitProperty
DetailAutoFitpropertyasitappliestothePivotFieldobject.
DetailAutoFitpropertyasitappliestothePivotViewobject.
![Page 1088: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1088.jpg)
DetailBackColorProperty
Returnsorsetsthebackcolorforthespecifiedfieldwhenthefieldisdisplayedinadetailgrid.Thedefaultbackcoloriswhite.Read/writeVariant.
expression.DetailBackColor
expressionRequired.AnexpressionthatreturnsaPivotFieldobject.
![Page 1089: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1089.jpg)
RemarksWhenyousetthisproperty,youcanuseeitheraLongvaluerepresentingared-green-bluecolorvalueoraStringvaluenamingavalidHTMLcolorvalue.Forexample,tosettheobjectcolortored,youcouldusethehexadecimalvalue&HFF,thedecimalvalue255,orthestringvalue"red."InMicrosoftVisualBasic,youcanusetheRGBfunctiontocreateared-green-bluecolorvalue(redisRGB(255,0,0)).ThispropertyalwaysreturnsthecolorasaLongvaluerepresentingared-green-bluecolorvalue.
![Page 1090: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1090.jpg)
DetailCellsProperty
ReturnsaPivotDetailCellobjectbasedonarowandcolumnindex.UsethispropertytoaccessthepropertiesofindividualcellsinthedetailareaofaPivotTablelist.
expression.Cell(Row,Column)
expressionAnexpressionthatreturnsaPivotCellobject.
RowRequiredLong.Specifiestherowthatcontainsthespecifiedcell.
ColumnRequiredLong.Specifiesthecolumnthatcontainsthespecifiedcell.
![Page 1091: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1091.jpg)
DetailColumnCountProperty
ReturnsaLongvaluethatrepresentsthenumberofcolumnsofdetailcellsinthespecifiedcell.Read-only.
expression.DetailColumnCount
expressionRequired.AnexpressionthatreturnsaPivotCellobject.
![Page 1092: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1092.jpg)
RemarksUsingthispropertywhenthePivotTablelistisconnectedtoanOLAPdatasourcewillresultinarun-timeerror.
![Page 1093: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1093.jpg)
DetailFontProperty
ReturnsaPivotFontobjectthatrepresentsthefontusedwhenthespecifiedfieldisdisplayedinthedetailgrid.Read-only.
expression.DetailFont
expressionRequired.AnexpressionthatreturnsaPivotFieldobject.
![Page 1094: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1094.jpg)
DetailForeColorProperty
Returnsorsetstheforegroundcolorforthespecifiedfieldwhenthefieldisdisplayedinadetailgrid.Read/writeVariant.
expression.DetailForeColor
expressionRequired.AnexpressionthatreturnsaPivotFieldobject.
![Page 1095: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1095.jpg)
RemarksWhenyousetthisproperty,youcanuseeitheraLongvaluerepresentingared-green-bluecolorvalueoraStringvaluenamingavalidHTMLcolorvalue.Forexample,tosettheobjectcolortored,youcouldusethehexadecimalvalue&HFF,thedecimalvalue255,orthestringvalue"red."InMicrosoftVisualBasic,youcanusetheRGBfunctiontocreateared-green-bluecolorvalue(redisRGB(255,0,0)).ThispropertyalwaysreturnsthecolorasaLongvaluerepresentingared-green-bluecolorvalue.
![Page 1096: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1096.jpg)
ExampleThisexampleaddsinsertsfieldsintoPivotTable1,addatotal,andthenformatsthefieldinthedetailareaofthePivotTablelist.
SubLayout_PivotTable1()DimvwViewDimptConstantsDimtotOrderCountSetptConstants=PivotTable1.ConstantsSetvwView=PivotTable1.ActiveView'AddtheShipCountryfieldtotherowaxis.vwView.RowAxis.InsertFieldSetvwView.FieldSets("ShipCountry")'AddtheOrderIdfieldtothedataaxis.vwView.DataAxis.InsertFieldSetvwView.FieldSets("OrderID")'AddtheShipViafieldtothefilteraxis.vwView.FilterAxis.InsertFieldSetvwView.FieldSets("ShipVia")'Createatotalnamed"OrderCount"thatcountstheOrderIDfield.SettotOrderCount=vwView.AddTotal("OrderCount",vwView.FieldSets("OrderId").Fields("OrderId"),_ptConstants.plFunctionCount)'AddtheOrderCounttotaltothedataaxis.vwView.DataAxis.InsertTotaltotOrderCount'SetthehorizontalalignmentoftheOrderIDfield.vwView.FieldSets("OrderId").Fields("OrderId").DetailHAlignment=plHAlignCenter
![Page 1097: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1097.jpg)
'SettheforegroundcoloroftheOrderIdfield.vwView.FieldSets("OrderId").Fields("OrderId").DetailForeColor=RGB(100,100,200)EndSub
![Page 1098: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1098.jpg)
ShowAll
![Page 1099: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1099.jpg)
DetailHAlignmentProperty
Returnsorsetsthewayfieldvaluesarehorizontallyalignedwhenthespecifiedfieldisdisplayedinadetailgrid.Bydefault,valuesareleft-aligned.Read/writePivotHAlignmentEnum.
expression.DetailHAlignment
expressionRequired.AnexpressionthatreturnsaPivotFieldobject.
![Page 1100: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1100.jpg)
ExampleThisexampleaddsinsertsfieldsintoPivotTable1,addatotal,andthenformatsthefieldinthedetailareaofthePivotTablelist.
SubLayout_PivotTable1()DimvwViewDimptConstantsDimtotOrderCountSetptConstants=PivotTable1.ConstantsSetvwView=PivotTable1.ActiveView'AddtheShipCountryfieldtotherowaxis.vwView.RowAxis.InsertFieldSetvwView.FieldSets("ShipCountry")'AddtheOrderIdfieldtothedataaxis.vwView.DataAxis.InsertFieldSetvwView.FieldSets("OrderID")'AddtheShipViafieldtothefilteraxis.vwView.FilterAxis.InsertFieldSetvwView.FieldSets("ShipVia")'Createatotalnamed"OrderCount"thatcounts'theOrderIDfield.SettotOrderCount=vwView.AddTotal("OrderCount",vwView.FieldSets("OrderId").Fields("OrderId"),_ptConstants.plFunctionCount)'AddtheOrderCounttotaltothedataaxis.vwView.DataAxis.InsertTotaltotOrderCount
![Page 1101: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1101.jpg)
'SetthehorizontalalignmentoftheOrderIDfield.vwView.FieldSets("OrderId").Fields("OrderId").DetailHAlignment'SettheforegroundcoloroftheOrderIdfield.vwView.FieldSets("OrderId").Fields("OrderId").DetailForeColor=RGB(100,100,200)EndSub
![Page 1102: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1102.jpg)
DetailLeftProperty
ReturnsorsetsaLongthatrepresentstheleftmostvisiblecolumninthedetailgrid.Read/write.
expression.DetailLeft(Column)
expressionAnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
ColumnRequiredPivotMemberobject.Specifiestheleftmostvisiblecolumninthedetailgrid.
![Page 1103: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1103.jpg)
DetailLeftOffsetProperty
ReturnsorsetsaLongvaluethatrepresentsthenumberofpixelsthatthedatainthedetailareaisoffsettotheleft.Usethispropertytomovethedatainthedetailareatotheleft.Read/write.
expression.DetailLeftOffset
expressionRequired.AnexpressionthatreturnsaPivotColumnMemberobject.
![Page 1104: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1104.jpg)
RemarksSettingthispropertytoanegativevaluewillresultinarun-timeerror.
![Page 1105: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1105.jpg)
ExampleThisexamplemovesthedatainthedetailareaofPivotTable110pixelstotheleft.
PivotTable1.ActiveData.ColumnAxis.ColumnMember.DetailLeftOffset
![Page 1106: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1106.jpg)
DetailMaxHeightProperty
Returnsorsetsthemaximumheight(inpixels)thatthedetailgridcanattainwhenthevalueoftheDetailAutoFitpropertyisTrue.Ascrollbarisdisplayediftheheightofthedetailgridwouldexceedthemaximumheight.Thedefaultvalueis250pixels.ThispropertyisignoredifthevalueoftheDetailAutoFitpropertyisFalse.Read/writeLong.
expression.DetailMaxHeight
expressionRequired.AnexpressionthatreturnsaPivotViewobject.
![Page 1107: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1107.jpg)
DetailMaxWidthProperty
Returnsorsetsthemaximumwidth(inpixels)thatthedetailgridcanattainwhenthevalueoftheDetailAutoFitpropertyisTrue.Ascrollbarisdisplayedifthewidthofthedetailgridwouldexceedthemaximumwidth.Thedefaultvalueis1024pixels.ThispropertyisignoredifthevalueoftheDetailAutoFitpropertyisFalse.Read/writeLong.
expression.DetailMaxWidth
expressionRequired.AnexpressionthatreturnsaPivotViewobject.
![Page 1108: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1108.jpg)
DetailRangeProperty
ReturnsaPivotDetailRangeobjectforthespecifiedarea.
expression.DetailRange(TopLeft,BottomRight)
expressionAnexpressionthatreturnsaPivotCellobject.
TopLeftRequiredPivotDetailCellobject.Specifiestheupper-leftcellinthedetailrange.
BottomRightRequiredPivotDetailCellobject.Specifiesthelower-rightcellinthedetailrange.
![Page 1109: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1109.jpg)
DetailRowCountProperty
ReturnsaLongvaluethatrepresentsthenumberofrowsinthedetailareathatcontainsthespecifiedcell.Read-only.
expression.DetailRowCount
expressionRequired.AnexpressionthatreturnsaPivotCellobject.
![Page 1110: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1110.jpg)
RemarksUsingthispropertywhenthePivotTablelistisconnectedtoanOLAPdatasourcewillresultinarun-timeerror.
![Page 1111: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1111.jpg)
DetailRowHeightProperty
Returnsorsetstherowheightforthedetailgrid(inpixels).Thedefaultvalueis10pixels.Read/writeLong.
expression.DetailRowHeight
expressionRequired.AnexpressionthatreturnsaPivotViewobject.
![Page 1112: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1112.jpg)
DetailsExpandedProperty
ReturnswhetherornotthedetailshavebeenexpandedinthedetailareaofthePivotTablelist.Read-onlyBoolean.
expression.DetailsExpanded
expressionRequired.AnexpressionthatreturnsaPivotColumnMemberobject.
![Page 1113: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1113.jpg)
RemarksUsingthispropertywhenthePivotTablelistisconnectedtoanOLAPdatasourcewillresultinarun-timeerror.
![Page 1114: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1114.jpg)
DetailSortOrderProperty
Returnsorsetsthesortorderforfieldsonthesummaryaxis.Read/writeVariant.
expression.DetailSortOrder
expressionRequired.AnexpressionthatreturnsaPivotViewobject.
![Page 1115: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1115.jpg)
RemarksFieldsaresortedinarrayorder.IfafieldincludedinthesortorderarrayhasitsSortDirectionpropertysettoplSortDirectionDefault,thefieldisignored.
![Page 1116: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1116.jpg)
DetailTopProperty
Returnsorsetstheindexoftheuppermostvisiblerowinthedetailgrid.Read/writeLong.
expression.DetailTop
expressionRequired.AnexpressionthatreturnsaPivotCellobject.
![Page 1117: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1117.jpg)
DetailTopOffsetProperty
ReturnsorsetsaLongvaluethatrepresentsthenumberofpixelsthatthespecifiedcellinthedetailareaisoffsettothetop.Usethispropertytomoveacellinthedetailareaupward.Read/write.
expression.DetailTopOffset
expressionRequired.AnexpressionthatreturnsaPivotCellobject.
![Page 1118: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1118.jpg)
RemarksSettingthispropertytoanegativevaluewillresultinarun-timeerror.
![Page 1119: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1119.jpg)
ExampleThisexamplemovesscrollsthecurrentlyselectedcellinthedetailareaofPivotTable1upby15pixels
PivotTable1.ActiveData.CurrentCell.DetailTopOffset=15
![Page 1120: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1120.jpg)
DetailWidthProperty
Returnsorsetsthewidthofthespecifiedfield(inpixels)whenitisdisplayedinthedetailgrid.Read/writeLong.
expression.DetailWidth
expressionRequired.AnexpressionthatreturnsaPivotFieldobject.
![Page 1121: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1121.jpg)
ShowAll
![Page 1122: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1122.jpg)
DirectionProperty
DirectionpropertyasitappliestotheChErrorBarsobject.
![Page 1123: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1123.jpg)
DirectionpropertyasitappliestotheSchemaParameterobject.
![Page 1124: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1124.jpg)
ExampleAsitappliestotheChErrorBarsobject.
![Page 1125: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1125.jpg)
DirectionalLightInclinationProperty
ReturnsorsetsaDoublespecifyingtherotationofthedirectionallightsourcealongthex-zplaneofthespecifiedchart.Validsettingsrangefrom-90to90.Settingthispropertyto-90placesthelightsourcedirectlybelowthechart.Settingthispropertyto90placesthelightsourcedirectlyabovethechart.Read/write.
expression.DirectionalLightInclination
expressionRequired.AnexpressionthatreturnsaChChartobject.
![Page 1126: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1126.jpg)
ExampleThisexampleconvertsthefirstchartinChartspace1toa3-DBarchartandsetsthelightingoptionsforthechart.
SubFormat3DLightSources()
Dimcht3DBar
'SetavariabletothefirstchartinChartspace1.Setcht3DBar=ChartSpace1.Charts(0)
'Changethecharttoa3-DBarchart.cht3DBar.Type=chChartTypeBar3D
'Settheintensityoftheambientlight.cht3DBar.AmbientLightIntensity=0.7
'Settheinclinationofthedirectionallightsource.cht3DBar.DirectionalLightInclination=35
'Settheintensityofthedirectionallightsource.cht3DBar.DirectionalLightIntensity=0.8
'Settherotationofthedirectionallightsource.cht3DBar.DirectionalLightRotation=120
EndSub
![Page 1127: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1127.jpg)
DirectionalLightIntensityProperty
ReturnsorsetsaDoublespecifyingtheintensityofthedirectionallightsourceforathree-dimensionalchart.Validsettingsrangefrom0to1.Read/write.
expression.DirectionalLightIntensity
expressionRequired.AnexpressionthatreturnsaChChartobject.
![Page 1128: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1128.jpg)
ExampleThisexampleconvertsthefirstchartinChartspace1toa3-DBarchartandsetsthelightingoptionsforthechart.
SubFormat_3D_LightSources()
Dimcht3DBar
'SetavariabletothefirstchartinChartspace1.Setcht3DBar=ChartSpace1.Charts(0)
'Changethecharttoa3DBarchart.cht3DBar.Type=chChartTypeBar3D
'Settheintensityoftheambientlight.cht3DBar.AmbientLightIntensity=0.7
'Settheinclinationofthedirectionallightsource.cht3DBar.DirectionalLightInclination=35
'Settheintensityofthedirectionallightsource.cht3DBar.DirectionalLightIntensity=0.8
'Settherotationofthedirectionallightsource.cht3DBar.DirectionalLightRotation=120EndSub
![Page 1129: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1129.jpg)
DirectionalLightRotationProperty
ReturnsorsetsaDoublespecifyingtherotationofthedirectionallightsourceforathree-dimensionalchart.Validsettingsarebetween0and360.Read/write.
expression.DirectionalLightRotation
expressionRequired.AnexpressionthatreturnsaChChartobject.
![Page 1130: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1130.jpg)
RemarksThedirectionallightsourcerotatesaroundthey-axisofthechart.
![Page 1131: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1131.jpg)
ExampleThisexampleconvertsthefirstchartinChartspace1toa3-DBarchartandsetsthelightingoptionsforthechart.
SubFormat3DLightSources()
Dimcht3DBar
'SetavariabletothefirstchartinChartspace1.Setcht3DBar=ChartSpace1.Charts(0)
'Changethecharttoa3DBarchart.cht3DBar.Type=chChartTypeBar3D
'Settheintensityoftheambientlight.cht3DBar.AmbientLightIntensity=0.7
'Settheinclinationofthedirectionallightsource.cht3DBar.DirectionalLightInclination=35
'Settheintensityofthedirectionallightsource.cht3DBar.DirectionalLightIntensity=0.8
'Settherotationofthedirectionallightsource.cht3DBar.DirectionalLightRotation=120
EndSub
![Page 1132: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1132.jpg)
DirtyProperty
Trueifchangeshavebeenmadetothespreadsheetsincethelasttimeitwassaved.Read/writeBoolean.
expression.Dirty
expressionRequired.AnexpressionthatreturnsaSpreadsheetobject.
![Page 1133: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1133.jpg)
ExampleThisexampleexportsthespreadsheettoafileifchangeshavebeenmadetoitsincethelasttimeitwassaved.
IfSpreadsheet1.DirtyThenSpreadsheet1.Export"sstest.xls",Spreadsheet1.Constants.ssExportActionNoneEndIf
![Page 1134: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1134.jpg)
ShowAll
![Page 1135: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1135.jpg)
DisplayAlertProperty
ReturnsorsetsaDscDisplayAlertconstantthatindicateswhetherornotanalertwillbedisplayedwhentheBeforeDeleteandBeforeOverwriteeventsarecalled.Read/write.
expression.DisplayAlert
expressionRequired.AnexpressionthatreturnsaDSCEventInfoobject.
![Page 1136: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1136.jpg)
ExampleThefollowingexampleusestheDisplayAlertpropertyintheBeforeOverwriteeventtopreventtheuserfrombeingpromptedtooverwriteanexistingfilewhentheExportXMLmethodiscalled.
SubMSODSC_BeforeOverwrite(DSCEventInfo)
DimdscConstantsSetdscConstants=MSODSC.Constants
'Don'talerttheuserwhenoverwritinganexistingfile.DSCEventInfo.DisplayAlert=dscConstants.dscDataAlertContinue
EndSub
![Page 1137: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1137.jpg)
DisplayAlertsProperty
Trueifcertainalertsandmessagesaretobedisplayedwhilecodeisrunning.ThedefaultvalueisTrue.SetthispropertytoFalseifyoudon'twanttobedisturbedbypromptsandalertmessages;anytimeamessagerequiresaresponse,thedefaultresponseischosen.
IfyousetthispropertytoFalse,itisnotautomaticallysetbacktoTrue,andmustbesettoTrueformessagesandalertstoappear.Read/writeBoolean.
expression.DisplayAlerts
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1138: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1138.jpg)
DisplayCalculatedMembersProperty
ReturnsorsetsaBooleanthatdetermineswhethercalculatedmembersaredisplayed.SetthispropertytoFalsetohidecalculatedmembers.ThedefaultvalueisTrue.Read/write.
expression.DisplayCalculatedMembers
expressionRequired.AnexpressionthatreturnsaPivotViewobject
![Page 1139: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1139.jpg)
DisplayColumnHeadingsProperty
Returnsorsetswhethercolumnheadingsaredisplayedinthespecifiedwindow.SetthispropertytoFalsetohidethecolumnsheadings.ThedefaultvalueisTrue.Read/writeBoolean.
expression.DisplayColumnHeadings
expressionRequired.AnexpressionthatreturnsaWindowobject.
![Page 1140: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1140.jpg)
ExampleThisexamplehidestherowandcolumnheadingsintheactivewindowofSpreadsheet1.
SubHideHeadings()Spreadsheet1.ActiveWindow.DisplayColumnHeadings=FalseSpreadsheet1.ActiveWindow.DisplayRowHeadings=FalseEndSub
![Page 1141: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1141.jpg)
DisplayCustomHeadingsProperty
Determineswhethercustomrowandcolumnheadings,iftheyexist,aretobedisplayedinthespecifiedwindow.ThedefaultvalueitTrue.Read/writeBoolean.
expression.DisplayCustomHeadings
expressionRequired.AnexpressionthatreturnsaWindowobject.
![Page 1142: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1142.jpg)
RemarksAlthoughsettingthispropertytoFalsehidescustomrowandcolumnheadings,theyarenotresetthemtotheirdefaultvalues.UsethispropertyinsteadofusingtheResetHeadingsmethodtotemporarilyhidethecustomrowandcolumnheadings.
![Page 1143: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1143.jpg)
ExampleThisexamplepreventsthedisplayofthecustomrowandcolumnheadingsintheactivewindowofSpreadsheet1.
Spreadsheet1.ActiveWindow.DisplayCustomHeadings=False
![Page 1144: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1144.jpg)
DisplayDesignTimeUIProperty
Truetodisplaythedesign-timeversionoftheCommandsandOptionswindowisdisplayedatruntime.ThedefaultvalueisFalse.Read/writeBoolean.
expression.DisplayDesignTimeUI
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1145: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1145.jpg)
ExampleThisexamplesetsSpreadsheet1sothatthedesign-timeCommandsandOptionswindowwillbedisplayedatruntime.
Spreadsheet1.DisplayDesignTimeUI=True
![Page 1146: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1146.jpg)
DisplayEmptyMembersProperty
Trueifemptymembersaredisplayed,eveniftheydonothaveaggregates.ThedefaultvalueisFalse.Read/writeBoolean.
expression.DisplayEmptyMembers
expressionRequired.AnexpressionthatreturnsaPivotGroupAxisobject.
![Page 1147: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1147.jpg)
DisplayExpandIndicatorProperty
Trueifexpansionindicatorsaredisplayedformemberswithavailablechildmembersordetailrecords.Whentheexpansionindicatorishidden,thememberdisplaynameappearsinthisspace.ThedefaultvalueisTrue.Read/writeBoolean.
expression.DisplayExpandIndicator
expressionRequired.AnexpressionthatreturnsaPivotTableobject.
![Page 1148: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1148.jpg)
DisplayFieldButtonsProperty
Returnsorsetswhetherfieldbuttonsanddropzonesaredisplayedonthechart.SetthispropertytoFalsetohidethefieldbuttonsanddropzones.ThedefaultvalueisTrue.Read/writeBoolean.
expression.DisplayFieldButtons
expressionRequired.AnexpressionthatreturnsaChartSpaceobject.
![Page 1149: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1149.jpg)
RemarksThispropertyhasnoeffectifthechartcontrolisboundtoaliteraldatasource.
![Page 1150: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1150.jpg)
ExampleThisexamplehidesthedropzonesandfieldbuttonsonChartspace1.
Chartspace1.DisplayFieldButtons=False
![Page 1151: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1151.jpg)
DisplayFieldListProperty
SetthispropertytoTruetodisplaytheFieldList.ThedefaultvalueisFalse.Read/writeBoolean.
expression.DisplayFieldList
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1152: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1152.jpg)
DisplayGridlinesProperty
Trueifgridlinesaredisplayedonthespecifiedspreadsheet.ThedefaultvalueisTrue.Read/writeBoolean.
expression.DisplayGridlines
expressionRequired.AnexpressionthatreturnsaWindowobject.
![Page 1153: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1153.jpg)
ExampleThisexamplehidesgridlinesonthespreadsheet.
Spreadsheet1.ActiveWindow.DisplayGridlines=False
![Page 1154: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1154.jpg)
DisplayHeadingsProperty
Trueifbothrowandcolumnheadingsaredisplayed;Falseiftherearenoheadingsdisplayed,orifeitherthecolumnorrowheadingsarenotdisplayed.Read/writeBoolean.
expression.DisplayHeadings
expressionRequired.AnexpressionthatreturnsaWindowobject.
![Page 1155: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1155.jpg)
RemarksYoucanusetheDisplayColumnHeadingsandDisplayRowHeadingspropertiestoindependentlycontrolthedisplayofcolumnandrowheadings.
![Page 1156: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1156.jpg)
ExampleThisexamplehidestherowandcolumnheadingsintheactivewindowofSpreadsheet1.
Spreadsheet1.ActiveWindow.DisplayHeadings=False
![Page 1157: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1157.jpg)
DisplayHorizontalScrollBarProperty
Trueifthehorizontalscrollbarisdisplayedonthespecifiedspreadsheet.ThedefaultvalueisTrue.Read/writeBoolean.
expression.DisplayHorizontalScrollBar
expressionRequired.AnexpressionthatreturnsaWindowobject.
![Page 1158: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1158.jpg)
ExampleThisexamplehidesthehorizontalscrollbaronthespreadsheet.
Spreadsheet1.ActiveWindow.DisplayHorizontalScrollBar=False
![Page 1159: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1159.jpg)
ShowAll
![Page 1160: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1160.jpg)
DisplayInProperty
ReturnsorsetsaPivotMemberPropertyDisplayEnumconstantthatdetermineswhetherthespecifiedmemberpropertyisdisplayedinthePivotTablelist,ScreenTip,boththePivotTablelistandScreenTip,ornotatall.Read/write.
expression.DisplayIn
expressionRequired.AnexpressionthatreturnsaPivotMemberPropertyobject.
![Page 1161: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1161.jpg)
ExampleThisexamplesetsthecaptionsof,andthendisplaysthemembercaptionsoftheStoreNamefield.
SubDisplay_MemberProperties()DimptViewDimptConstantsDimfldStoreName
SetptConstants=PivotTable1.Constants
'SetavariabletotheactiveviewofthePivotTable.SetptView=PivotTable1.ActiveView
'SetavariabletotheStoreNamefield.SetfldStoreName=ptView.FieldSets("Store").Fields("StoreName")
'Thefollowingthreelinesofcodespecifythatthememberpropertiesare'displayedinthePivotTablelist.fldStoreName.MemberProperties("StoreManager").DisplayIn=ptConstants.plDisplayPropertyInReportfldStoreName.MemberProperties("StoreType").DisplayIn=ptConstants.plDisplayPropertyInReportfldStoreName.MemberProperties("StoreSqft").DisplayIn=ptConstants.plDisplayPropertyInReport
'Thefollowingthreelinesofcodesetthecaptionforthememberproperties.fldStoreName.MemberProperties("StoreManager").Caption="ManagerName"fldStoreName.MemberProperties("StoreType").Caption="StoreType"fldStoreName.MemberProperties("StoreSqft").Caption="SizeinSQFT"EndSub
![Page 1162: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1162.jpg)
DisplayInFieldListProperty
ReturnsorsetswhetherthespecifiedfieldsetortotalappearsinthePivotTableFieldListdialogbox.SetthispropertytoFalsetopreventthespecifiedfieldsetortotalfromappearinginthePivotTableFieldListdialogbox.ThedefaultvalueisTrue.Read/writeBoolean.
expression.DisplayInFieldList
expressionRequired.AnexpressionthatreturnsaPivotFieldSetorPivotTotalobject.
![Page 1163: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1163.jpg)
ExampleThisexampleaddsanewtotaltoPivotTable1.Thenewtotalisformattedtodisplayasapercentageoftheparentrowfield,andwillnotappearinthePivotTableFieldListdialogbox.
SubAdd_Total()
DimvwViewDimptConstantsDimtotNewTotal
SetvwView=PivotTable1.ActiveViewSetptConstants=PivotTable1.Constants
'Addanewtotalnamed"TotalBudget"tothecurrentview.SettotNewTotal=vwView.AddTotal("TotalBudget",vwView.FieldSets("Budget").Fields(0),_ptConstants.plFunctionSum)
'InsertthenewlycreatedtotalintothedetailareaofthePivotTable.vwView.DataAxis.InsertTotaltotNewTotal
'Showthetotalsasapercentageoftheparentrowfield.totNewTotal.ShowAs=ptConstants.plShowAsPercentOfRowParent
'DonotdisplaythenewtotalinthePivotTableFieldListdialogbox.totNewTotal.DisplayInFieldList=False
EndSub
![Page 1164: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1164.jpg)
DisplayOfficeLogoProperty
TruetodisplaytheMicrosoftOfficelogoonthetoolbar.Read/writeBoolean.
expression.DisplayOfficeLogo
expressionRequired.AnexpressionthatreturnsaChartSpace,PivotTable,orSpreadsheetobject.
![Page 1165: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1165.jpg)
ExampleThisexamplehidestheMicrosoftOfficelogoonPivotTable1'stoolbar.
PivotTable1.DisplayOfficeLogo=False
![Page 1166: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1166.jpg)
DisplayPropertyToolboxProperty
SetthispropertytoTruetodisplaytheCommandandOptionswindow.Read/writeBoolean.
expression.DisplayPropertyToolbox
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1167: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1167.jpg)
DisplayRowHeadingsProperty
Determineswhetherrowheadingsaredisplayedinthespecifiedwindow.SetthispropertytoFalsetohidetherowheaders.ThedefaultvalueisTrue.Read/writeBoolean.
expression.DisplayRowHeadings
expressionRequired.AnexpressionthatreturnsaWindowobject.
![Page 1168: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1168.jpg)
ExampleThisexamplehidestherowandcolumnheadingsintheactivewindowofSpreadsheet1.
SubHideHeadings()Spreadsheet1.ActiveWindow.DisplayColumnHeadings=FalseSpreadsheet1.ActiveWindow.DisplayRowHeadings=FalseEndSub
![Page 1169: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1169.jpg)
DisplayScreenTipsProperty
ReturnsorsetswhetherScreenTipsaredisplayed.SetthispropertytoFalsetopreventthedisplayofScreenTips.ThedefaultvalueisTrue.Read/writeBoolean.
expression.DisplayScreenTips
expressionRequired.AnexpressionthatreturnsaPivotTableorChartSpaceobject.
![Page 1170: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1170.jpg)
ExampleThisexampledisablesScreenTipsforPivotTable1.
PivotTable1.DisplayScreenTips=False
![Page 1171: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1171.jpg)
DisplayTitleBarProperty
Trueifthetitlebaronthespecifiedspreadsheetisdisplayed.ThedefaultvalueisTrue.Read/writeBoolean.
expression.DisplayTitleBar
expressionRequired.AnexpressionthatreturnsaSpreadsheetobject.
![Page 1172: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1172.jpg)
ExampleThisexamplehidesthespreadsheet’stitlebar.
Spreadsheet1.DisplayTitleBar=False
![Page 1173: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1173.jpg)
DisplayToolbarProperty
Trueifthetoolbaronthespecifiedspreadsheet,chartspace,orPivotTablelistisdisplayed.ThedefaultvalueisTrue.Read/writeBoolean.
expression.DisplayToolbar
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1174: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1174.jpg)
RemarksHidingthetoolbardoesnotchangetheheightofthePivotTablelist,butitdoescausealayoutchange.ThewidthisunchangedunlesstheAutoFitpropertyisTrueandthePivotTablelistwassizedwiderthanthenecessarytoaccommodatethetoolbar.
![Page 1175: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1175.jpg)
ExampleThisexamplehidesthespreadsheet’stoolbar.
Spreadsheet1.DisplayToolbar=False
![Page 1176: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1176.jpg)
DisplayTotalProperty
ReturnswhetherornottotalsaredisplayedforthespecifiedPivotResultGroupFieldobject.Read-onlyBoolean.
expression.DisplayTotal
expressionRequired.AnexpressionthatreturnsaPivotResultGroupFieldobject.
![Page 1177: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1177.jpg)
DisplayVerticalScrollBarProperty
Trueiftheverticalscrollbaronthespecifiedspreadsheetisdisplayed.ThedefaultvalueisTrue.Read/writeBoolean.
expression.DisplayVerticalScrollBar
expressionRequired.AnexpressionthatreturnsaWindowobject.
![Page 1178: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1178.jpg)
ExampleThisexamplehidesthespreadsheet’sverticalscrollbar.
Spreadsheet1.ActiveWindow.DisplayVerticalScrollBar=False
![Page 1179: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1179.jpg)
DisplayWorkbookTabsProperty
Trueiftheworkbooktabsaredisplayed.SettingthispropertytoFalseforasingleWindowobjectsetsthispropertytoFalseforallwindowsintheworkbook.ThedefaultvalueisTrue.Read/writeBoolean.
expression.DisplayWorkbookTabs
expressionRequired.AnexpressionthatreturnsaWindowobject.
![Page 1180: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1180.jpg)
DisplayZerosProperty
Trueifzerovaluesaredisplayed.SetthispropertytoFalseifyouwanttohideallzerovaluesinthespecifiedwindow.Read/writeBoolean.
expression.DisplayZeros
expressionRequired.AnexpressionthatreturnsaWindowobject.
![Page 1181: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1181.jpg)
DivisionsProperty
ReturnsorsetsaLongvaluethatrepresentsthenumberofdivisionsthatappearinthelegendforthespecifiedsegment.Read/write.
expression.Divisions
expressionRequired.AnexpressionthatreturnsaChSegmentobject.
![Page 1182: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1182.jpg)
ExampleThisexamplebindsChartspace1totheOrderDetailstableintheSQLServerNorthwinddatabase.Then,aformatmapiscreatedthatdisplaysthelargervaluesinthechartwithadarkershadeofblue.
SubWindow_Onload()
DimserSeries1DimsegSegment1DimchConstants
SetchConstants=ChartSpace1.Constants
'ThefollowingtwolinesofcodebindChartspace1totheOrderDetailstableinthe'NorthwindSQLServerdatabase.ChartSpace1.ConnectionString="Provider=SQLOLEDB.1;PersistSecurityInfo=TRUE;"&_"IntegratedSecurity=SSPI;InitialCatalog=Northwind;"&_"DataSource=ServerName;"ChartSpace1.DataMember="OrderDetails"
'ThefollowingtwolinesofcodebindChartspace1totheQuantityandProductIDfields'intheOrderdetailstable.ChartSpace1.SetDatachConstants.chDimCategories,chConstants.chDataBound,"ProductID"ChartSpace1.SetDatachConstants.chDimValues,chConstants.chDataBound,"Quantity"
'Createaformatmap.ChartSpace1.SetDatachConstants.chDimFormatValues,chConstants.chDataBound,"Quantity"
'SetavariabletothefirstseriesinthefirstchartinChartspace1.SetserSeries1=ChartSpace1.Charts(0).SeriesCollection(0)
![Page 1183: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1183.jpg)
'Addasegmenttotheformatmap.SetsegSegment1=serSeries1.FormatMap.Segments.Add
'Measurethesegmentboundariesbaseduponapercentage.segSegment1.Begin.ValueType=chConstants.chBoundaryValuePercentsegSegment1.End.ValueType=chConstants.chBoundaryValuePercent
'Setthebeginningvalueto0%,andtheendingvalueto100%.segSegment1.Begin.Value=0segSegment1.End.Value=1
'Formattheinteriorofthematchingvalues.segSegment1.Begin.Interior.Color="White"segSegment1.End.Interior.Color="Blue"
segSegment1.HasDiscreteDivisions=True
segSegment1.Divisions=3
EndSub
![Page 1184: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1184.jpg)
ShowAll
![Page 1185: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1185.jpg)
DrawTypeProperty
ReturnsaChartDrawModesEnumconstantindicatingwhichdrawingpassisbeingperformed.Read-only.
expression.DrawType
expressionRequired.AnexpressionthatreturnsaChChartDrawobject.
![Page 1186: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1186.jpg)
ShowAll
![Page 1187: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1187.jpg)
EditModeProperty
ReturnsaPivotEditModeEnumconstantthatindicateswhetherthePivotTablelistiscurrentlyineditmode.Read-only.
expression.EditMode
expressionRequired.AnexpressionthatreturnsaPivotTableobject.
![Page 1188: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1188.jpg)
ElementExtensionsProperty
ReturnstheElementExtensionsobjectforthedatasourcecontrol.
expression.ElementExtensions
expressionRequired.AnexpressionthatreturnsaDataSourceControlobject.
![Page 1189: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1189.jpg)
ElementIDProperty
SpecifiestheIDtagfortheHTMLelementusedwiththespecifiedextension.Read-onlyString.
expression.ElementID
expressionRequired.AnexpressionthatreturnsaElementExtensionobject.
![Page 1190: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1190.jpg)
EnableAutoFilterProperty
Trueifthespecifiedworksheetcanbefiltered.ThispropertyhasnoeffectiftheProtectionEnabledpropertyissettoFalse.Read/writeBoolean.
expression.EnableAutoFilter
expressionRequired.AnexpressionthatreturnsaWorksheetobject.
![Page 1191: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1191.jpg)
ExampleThisexampleenablesAutoFilterfortheactiveworksheet,andthenprotectstheworksheetinSpreadsheet1.
SubProtectWorksheet_EnableAutoFilterSpreadsheet1.ActiveSheet.EnableAutoFilter=TrueSpreadsheet1.ActiveSheet.Protection.Enabled=TrueEndSub
![Page 1192: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1192.jpg)
EnabledProperty
OCCommandobject:ReturnsaBooleanthatrepresentswhetherornotthespecifiedcommandisenabled.Readonly.
Protectionobject:ReturnsorsetsaBooleanthatdetermineswhetherornotprotectionisenabledforthespecifiedworksheet.SetthispropertytoTruetoprotecttheworksheet.IfthispropertyissettoFalse,theotherProtectionobjectpropertysettingsareignored.Read/write.
expression.Enabled
expressionRequired.AnexpressionthatreturnsanOCCommandorProtectionobject.
![Page 1193: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1193.jpg)
ExampleThisexamplepreventsauserfrominsertingrowsontheactiveworksheet.
SubPreventInsertingRows()
Dimpt
Setpt=Spreadsheet1.ActiveSheet.Protection
pt.AllowInsertingRows=False
pt.Enabled=True
EndSub
![Page 1194: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1194.jpg)
EnableEventsProperty
Trueifeventsareenabledforthespreadsheetorthechartworkspace.Read/writeBoolean.
expression.EnableEvents
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1195: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1195.jpg)
ExampleThisexamplepreventsspreadsheeteventproceduresfromrunning.
Spreadsheet1.EnableEvents=False
![Page 1196: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1196.jpg)
EnableResizeProperty
Trueifthespreadsheetcontrolcanberesizedbytheuser.SetthispropertytoFalsetopreventtheuserfromresizingthespreadsheetcontrol.ThedefaultvalueisTrue.Read/writeBoolean.
expression.EnableResize
expressionRequired.AnexpressionthatreturnsaWindowobject.
![Page 1197: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1197.jpg)
ExampleThisexamplesetstheheightandwidthofthespreadsheetcontrolandthenpreventstheuserfromresizingthecontrol.
SubSize_Spreadsheet()'Settheheightofthespreadsheetcontrol.Spreadsheet1.Height=4000
'Setthewidthofthespreadsheetcontrol.Spreadsheet1.Width=6000
'Preventtheuserfromresizingthespreadsheetcontrol.Spreadsheet1.ActiveWindow.EnableResize=FalseEndSub
![Page 1198: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1198.jpg)
EnableUndoProperty
Trueiftheundofunctionalityisenabledforthespecifiedspreadsheet.SettingtheEnableUndopropertytoFalsedisablestheundofunctionalityofthespreadsheetcomponent.Read/writeBoolean.
expression.EnableUndo
expressionRequired.AnexpressionthatreturnsaSpreadsheetobject.
![Page 1199: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1199.jpg)
ExampleThisexamplecreatesanundoblockcontainingcodethatsetsthenumberformatandfontforthecellD10.
SubUndo_Block()DimrngCurrent'Enableundo.Spreadsheet1.EnableUndo=True'Startanundoblock.Spreadsheet1.BeginUndoSetrngCurrent=Spreadsheet1.Worksheets("sheet1").Range("D10")'Thefollowingthreelinesofcodeapply'variousformattingtocellD10.rngCurrent.NumberFormat="0.###"rngCurrent.Font.Color="Blue"rngCurrent.Font.Name="TimesNewRoman"'Endtheundoblock.Spreadsheet1.EndUndoEndSub
![Page 1200: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1200.jpg)
ShowAll
![Page 1201: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1201.jpg)
EndProperty
EndpropertyasitappliestotheRangeobject.
EndpropertyasitappliestotheChSegmentobject.
![Page 1202: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1202.jpg)
ExampleAsitappliestotheRangeobject.
AsitappliestotheChSegmentobject.
![Page 1203: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1203.jpg)
ShowAll
![Page 1204: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1204.jpg)
EndStyleProperty
Returnsorsetstheendstyleforerrorbars.Read/writeChartEndStyleEnum.
expression.EndStyle
expressionRequired.AnexpressionthatreturnsaChErrorBarsobject
![Page 1205: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1205.jpg)
ExampleThisexampleaddserrorbarstoalloftheseriesinthefirstchartinChartSpace1andthensetstheerroramountandendstyle.
SubAdd_Error_Bars()DimebErrorBarsDimserChartSeriesDimchConstants
SetchConstants=ChartSpace1.Constants
'Loopthroughalloftheseriesinthefirstchart'inChartSpace1.ForEachserChartSeriesinChartSpace1.Charts(0).SeriesCollection
'Adderrorbarstothecurrentseries.SetebErrorBars=serChartSeries.ErrorBarsCollection.Add
'Settheerrorbarstobeapercentageofthevalue.eberrorBars.Type=chConstants.chErrorBarTypePercent'Setthepercentageamount.ebErrorBars.Amount=0.05'Settheendstyleoftheerrorbars.ebErrorBars.EndStyle=chConstants.chEndStyleNoneNextEndSub
![Page 1206: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1206.jpg)
EntireColumnProperty
ReturnsaRangeobjectthatrepresentstheentirecolumn(orcolumns)containingthespecifiedrange.Read-only.
expression.EntireColumn
expressionRequired.AnexpressionthatreturnsaRangeobject.
![Page 1207: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1207.jpg)
ExampleThisexamplesetsthefontcolorfortheentirecolumncontainingtheactivecell.
Spreadsheet1.ActiveCell.EntireColumn.Font.Color="green"
![Page 1208: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1208.jpg)
EntireRowProperty
ReturnsaRangeobjectthatrepresentstheentirerow(orrows)containingthespecifiedrange.Read-only.
expression.EntireRow
expressionRequired.AnexpressionthatreturnsaRangeobject.
![Page 1209: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1209.jpg)
ExampleThisexamplesetsthefontcolorfortheentirerowcontainingtheactivecell.
Spreadsheet1.ActiveCell.EntireRow.Font.Color="red"
![Page 1210: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1210.jpg)
ErrorProperty
ReturnsanADOErrorobjectthatcontainserrorinformationaboutthespecifiedevent.Read-only.
expression.Error
expressionRequired.AnexpressionthatreturnsaDSCEventInfoobject.
![Page 1211: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1211.jpg)
ErrorBarsCollectionProperty
ReturnsaChErrorBarsCollectioncollectionthatcontainsaChErrorBarsobjectforeachsetoferrorbarsinthespecifiedseries.Aseriescanhaveonlyonesetoferrorbars,sotheChErrorBarsCollectioncollectionnevercontainsmorethanoneobject.Read-only.
expression.ErrorBarsCollection
expressionRequired.AnexpressionthatreturnsaChSeriesobject.
![Page 1212: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1212.jpg)
ExampleThisexampleaddserrorbarstoalloftheseriesinthefirstchartinChartSpace1andthensetstheerroramountandendstyle.
SubAdd_Error_Bars()DimebErrorBarsDimserChartSeriesDimchConstants
SetchConstants=ChartSpace1.Constants
'Loopthroughalloftheseriesinthefirstchart'inChartSpace1.ForEachserChartSeriesinChartSpace1.Charts(0).SeriesCollection
'Adderrorbarstothecurrentseries.SetebErrorBars=serChartSeries.ErrorBarsCollection.Add
'Settheerrorbarstobeapercentageofthevalue.eberrorBars.Type=chConstants.chErrorBarTypePercent'Setthepercentageamount.ebErrorBars.Amount=0.05'Settheendstyleoftheerrorbars.ebErrorBars.EndStyle=chConstants.chEndStyleNoneNextEndSub
![Page 1213: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1213.jpg)
ExcludedMembersProperty
Returnsorsetsthemembersthatyoudonotwanttobedisplayedinthespecifiedfield.ThispropertycanbesettoasinglememberoraVariantarrayofmembers.ThememberscanbepassedasoneormorePivotMemberobjects,membernames,oruniquemembernames.
expression.ExcludedMembers
expressionRequired.AnexpressionthatreturnsaPivotFieldobject.
![Page 1214: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1214.jpg)
RemarksMembersthatareexplicitlyexcludedstillappearinthePivotTablelistifoneormoreoftheirchildrenareincluded.Settingthispropertyclearsallprevioussettingsofthispropertyforthespecifiedfield.YoucansettheExcludedMemberspropertytoEmpty(ExcludedMembers=Empty)ortoazero-lengthVariantarray(ExcludedMembers=Array())tocleartheincludedmemberslistforthespecifiedfield.
![Page 1215: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1215.jpg)
ExampleThisexamplesetstheincludedandexcludedmembersoftheStoreStateandStoreCityfieldsinPivotTable1.
SubMember_Filtering()
DimfldStoreCityDimfldStoreStateDimptView
'SetavariabletothecurrentPivotTableview.SetptView=PivotTable1.ActiveView
'SetavariabletotheStoreStatefield.SetfldStoreState=ptView.FieldSets("Store").Fields("StoreState")
'SetavariabletotheStoreCityfield.SetfldStoreCity=ptView.FieldSets("Store").Fields("StoreCity")
'ExcludeCaliforniaandWashingtonfromtheStoreStatefield.fldStoreState.ExcludedMembers=Array("CA","WA")
'IncludemembersoftheStoreCityfield.Notethatthecitiesare'instatesthathavebeenexcludedbythepreviousline.Since'StoreStateisaparenttoStoreCity,thentheexcludedstates'aredisplayedinthePivotTable.fldStoreCity.IncludedMembers=Array("LosAngeles","SanDiego",_"Seattle","Spokane")
EndSub
![Page 1216: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1216.jpg)
ShowAll
![Page 1217: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1217.jpg)
ExpandDetailsProperty
ReturnsorsetsaPivotTableExpandEnumconstantthatrepresentswhetherornotfieldsareexpandedwhenaddedtothedetailareaofaPivotTablelist.Read/write.
expression.ExpandDetails
expressionRequired.AnexpressionthatreturnsaPivotViewobject.
![Page 1218: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1218.jpg)
ExampleThisexamplesetsPivotTable1sothatfieldsareneverexpandedwhentheyareaddedtothePivotTablelist.
SubNeverExpand()DimpvtViewDimptConstants
SetptConstants=PivotTable1.Constants
'Setavariabletotheactiveview.SetpvtView=PivotTable1.ActiveView
'Alwaysexpandfieldswhentheyareadded'toaPivotTablelist.pvtView.ExpandMembers=ptConstants.plExpandNever
'Alwaysexpandfieldswhentheyareadded'tothedetailareaPivotTablelist.pvtView.ExpandDetails=ptConstants.plExpandNeverEndSub
![Page 1219: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1219.jpg)
ExpandedProperty
PivotCellobject:Trueifthedetailgridisbeingdisplayedforthespecifiedcell.IfthispropertyissettoFalse,thedetailgridisnotdisplayedbutaggregatesaredisplayediftheyareavailable.Read/writeBoolean.
PivotAxisMemberobject:Trueifchildmembersarebeingdisplayedforthespecifiedmember;Falseifchildmembersarecollapsed.Read/writeBoolean.
PivotFieldobject:Returnsorsetstheexpandedstateofallthemembersofthespecifiedfieldatthesametime.SettingtheExpandedpropertyforthefieldimmediatelysetstheExpandedpropertyforallthemembersassociatedwiththefield.SettingtheExpandedpropertyforasinglememberofthefielddoesnotaffecttheExpandedpropertyforthefielditself.Read/writeBoolean.
expression.Expanded
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1220: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1220.jpg)
ExpandedByDefaultProperty
Trueifthespecifiedgrouplevelisexpandedbydefault.ThedefaultvalueisFalse.Read/writeBoolean.
expression.ExpandedByDefault
expressionRequired.AnexpressionthatreturnsaGroupLevelobject.
![Page 1221: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1221.jpg)
ShowAll
![Page 1222: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1222.jpg)
ExpandMembersProperty
ReturnsorsetsaPivotTableExpandEnumconstantthatrepresentswhetherornotfieldsandtheirmembersareexpandedwhenafieldisaddedtoaPivotTablelist.Read/write.
expression.ExpandMembers
expressionRequired.AnexpressionthatreturnsaPivotViewobject.
![Page 1223: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1223.jpg)
ExampleThisexamplesetsPivotTable1sothatfieldsareneverexpandedwhentheyareaddedtothePivotTablelist.
SubNeverExpand()DimpvtViewDimptConstants
SetptConstants=PivotTable1.Constants
'Setavariabletotheactiveview.SetpvtView=PivotTable1.ActiveView
'Alwaysexpandfieldswhentheyareadded'toaPivotTablelist.pvtView.ExpandMembers=ptConstants.plExpandNever
'Alwaysexpandfieldswhentheyareadded'tothedetailareaPivotTablelist.pvtView.ExpandDetails=ptConstants.plExpandNeverEndSub
![Page 1224: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1224.jpg)
ShowAll
![Page 1225: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1225.jpg)
ExplosionProperty
ExplosionpropertyasitappliestotheChPointobject.
ExplosionpropertyasitappliestotheChSeriesobject.
![Page 1226: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1226.jpg)
ExampleAsitappliestotheChPointobject.
AsitappliestotheChSeriesobject.
![Page 1227: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1227.jpg)
ExpressionProperty
ReturnsorsetsaStringthatrepresentstheexpressionusedtocalculatethespecifiedcalculatedfieldorcalculatedtotal.TheexpressionmustbecompatiblewiththeJetexpressionservice.Read/write.
expression.Expression
expressionRequired.AnexpressionthatreturnsaoneoftheobjectsintheAppliesTolist.
![Page 1228: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1228.jpg)
RemarksTheExpressionpropertywillreturnablankstringifitisnotusedwithacalculatedfieldorcalculatedtotal.
![Page 1229: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1229.jpg)
ExampleThefollowingexampledisplaysthecurrentexpressionusedforacalculatedfieldnamed"Variance"inPivotTable1.WhenyouedittheexpressionandthenclickOK,thenewexpressionisassignedtotheVariancefield.
SubChange_Expression()
DimvwViewDimcfCalcFieldDimstrCurrentExpressionDimstrNewExpression
SetvwView=PivotTable1.ActiveView
'Setavaribletothecalculatedfield.SetcfCalcField=_vwView.Fieldsets("Variance").Fields("Variance")
'Setavariabletothecurrentexpressionusedinthe'Variancefield.strCurrentExpression=cfCalcField.Expression
'Displayaninputboxthatcontainsthecurrentexpressionforthe'Variancefield.EdittheexpressionandthenclickOK.strNewExpression=InputBox("Edittheexpressionusedforthecalculated"&_"fieldandthenclickOK.",,strCurrentExpression)
'SettheexpressionusedtocalculatetheVariancefieldtothe'expressionenteredintheinputbox.cfCalcField.Expression=strNewExpression
![Page 1230: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1230.jpg)
EndSub
![Page 1231: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1231.jpg)
ExtrudeAngleProperty
ReturnsorsetsaDoublespecifyingthedirectionofextrusionforathree-dimensionalchart.ThispropertyisvalidonlyiftheProjectionModepropertyofthecharthasbeensettochProjectionModeOrthographic.Validvaluesrangefrom0to360.Thedefaultvalueis45.Read/write.
expression.ExtrudeAngle
expressionRequired.AnexpressionthatreturnsaChChartobject.
![Page 1232: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1232.jpg)
ExampleThisexampleconvertsthefirstchartinChartspace1toa3-DColumnchartandthensetstheprojectionmodeofthechart.
SubSetExtrudeAngle()
Dimcht3DColumnDimchConstants
SetchConstants=Chartspace1.Constants
'SetavariabletothefirstchartinChartspace1.Setcht3DColumn=ChartSpace1.Charts(0)
'Changethecharttoa3-DColumnchart.cht3DColumn.Type=chChartTypeColumnClustered3D
'Settheprojectionmodetoorthographic.cht3DColumn.ProjectionMode=chConstants.chProjectionModeOrthographic
'Settheextrusionangle.cht3DColumn.ExtrudeAngle=75
EndSub
![Page 1233: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1233.jpg)
FieldProperty
ReturnsaPivotFieldobjectthatrepresentsthefieldassociatedwiththespecifiedmemberortotal.
expression.Field
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1234: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1234.jpg)
FieldLabelBackColorProperty
Returnsorsetsthebackcolorusedforfieldlabelsforrows,columns,andfilters.Thedefaultvalueis25%gray.Read/writeVariant.
expression.FieldLabelBackColor
expressionRequired.AnexpressionthatreturnsaPivotViewobject.
![Page 1235: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1235.jpg)
RemarksWhenyousetthisproperty,youcanuseeitheraLongvaluerepresentingared-green-bluecolorvalueoraStringvaluenamingavalidHTMLcolorvalue.Forexample,tosettheobjectcolortored,youcouldusethehexadecimalvalue&HFF,thedecimalvalue255,orthestringvalue"red."InMicrosoftVisualBasic,youcanusetheRGBfunctiontocreateared-green-bluecolorvalue(redisRGB(255,0,0)).ThispropertyalwaysreturnsthecolorasaLongvaluerepresentingared-green-bluecolorvalue.
![Page 1236: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1236.jpg)
FieldLabelFontProperty
ReturnsaPivotFontobjectthatrepresentsthefieldlabelfontforrows,columns,andfilters.Read-only.
expression.FieldLabelFont
expressionRequired.AnexpressionthatreturnsaPivotViewobject.
![Page 1237: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1237.jpg)
FieldLabelForeColorProperty
Returnsorsetstheforegroundcolorusedforfieldlabelsforrows,columns,andfilters.Read/writeVariant.
expression.FieldLabelForeColor
expressionRequired.AnexpressionthatreturnsaPivotViewobject.
![Page 1238: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1238.jpg)
RemarksWhenyousetthisproperty,youcanuseeitheraLongvaluerepresentingared-green-bluecolorvalueoraStringvaluenamingavalidHTMLcolorvalue.Forexample,tosettheobjectcolortored,youcouldusethehexadecimalvalue&HFF,thedecimalvalue255,orthestringvalue"red."InMicrosoftVisualBasic,youcanusetheRGBfunctiontocreateared-green-bluecolorvalue(redisRGB(255,0,0)).ThispropertyalwaysreturnsthecolorasaLongvaluerepresentingared-green-bluecolorvalue.
![Page 1239: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1239.jpg)
FieldLabelHeightProperty
Returnstheheightofthefieldlabelsforrows,columns,andfilters.Read-onlyLong.
expression.FieldLabelHeight
expressionRequired.AnexpressionthatreturnsaPivotViewobject.
![Page 1240: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1240.jpg)
FieldsProperty
ReturnsthePivotFieldscollectionforthespecifiedfieldset.
expression.Fields
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1241: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1241.jpg)
FieldSetProperty
ReturnsaPivotFieldSetobjectthatrepresentsthefieldsettowhichthespecifiedfieldbelongs.
expression.FieldSet
expressionRequired.AnexpressionthatreturnsaPivotFieldobject.
![Page 1242: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1242.jpg)
FieldSetsProperty
ReturnsaPivotFieldSetsobjectthatcontainsthefieldsetsassociatedwiththespecifiedaxisorview.
expression.FieldSets
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1243: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1243.jpg)
ShowAll
![Page 1244: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1244.jpg)
FieldTypeProperty
Returnsthefieldtypeforthespecifiedfield.Read-onlyDscFieldTypeEnum.
expression.FieldType
expressionRequired.AnexpressionthatreturnsaPageFieldproperty.
![Page 1245: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1245.jpg)
ShowAll
![Page 1246: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1246.jpg)
FillTypeProperty
ReturnsaChartFillTypeEnumconstantindicatingthetypeoffillusedforthespecifiedChInteriorobject.Read-only.
expression.FillType
expressionRequired.AnexpressionthatreturnsaChInteriorobject.
![Page 1247: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1247.jpg)
RemarksYoucanusethefollowingmethodstosetthetypeoffillforaChInteriorobject:SetOneColorGradient,SetPatterned,SetPresetGradient,SetSolid,SetTextured,andSetTwoColorGradient.
![Page 1248: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1248.jpg)
FilterProperty
ReturnstheADOfilterstringfortherecordsetthatcorrespondstothedataaccesspage.Read/writeVariant.
expression.Filter
expressionRequired.AnexpressionthatreturnsaDataPageobject.
![Page 1249: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1249.jpg)
FilterAxisProperty
PivotDataobject:ReturnsaPivotResultFilterAxisobjectthatrepresentsthefilteraxis.
PivotViewobject:ReturnsaPivotFilterAxisobjectthatrepresentsthefilteraxis.
expression.FilterAxis
expressionRequired.AnexpressionthatreturnsaPivotDataorPivotViewobject.
![Page 1250: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1250.jpg)
FilterCaptionProperty
ReturnsaStringthatrepresentsthecaptiondisplayedjustbelowafieldsetonthefilteraxis.Read-only.
expression.FilterCaption
expressionRequired.AnexpressionthatreturnsaPivotFieldSetobject.
![Page 1251: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1251.jpg)
RemarksIftheuserhasselectedonlyoneiteminthespecifiedfield,thispropertywillreturnthatitem.Iftheuserhasselectedmultipleitemsinthefield,thispropertywillmostlikelyreturn"(MultipleItems)".
![Page 1252: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1252.jpg)
FilterContextProperty
ReturnsaPivotFieldobjectthatrepresentsthecontextbywhichtheconditionalfilterwillbeevaluated.
expression.FilterContext
expressionRequired.AnexpressionthatreturnsaPivotFieldobject.
![Page 1253: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1253.jpg)
RemarksWhenyouapplyaconditionalfiltertoafield,thefiltercanapplytothatfield,oroneofitsparentfieldsinthefieldset.Forexample,assumethatyourPivotTablelistcontainsafieldsetnamedStore.TheStorefieldsetcontainsthefollowingfields:Country,Region,City,andStoreNumber.TheCountryfieldisaparenttotheRegionfield,theRegionfieldisaparenttotheCityfield,andtheCityfieldisaparenttotheStoreNumberfield.
Nowyouwanttofindthetopfivemostprofitablecities.IfyousetthispropertytotheCityfield,thenthetopfivemostprofitablecitieswillbedisplayedinthePivotTablelist.IfyousetthispropertytotheRegionfield,thenthetopfivecitieswillbereturnedforeachregion.
Settingthispropertytoachildofthefieldthatyouareapplyingaconditionalfiltertowillresultinarun-timeerror.Forexample,youcannotsetthispropertytotheStoreNumberfieldwhenyouareapplyingaconditionalfiltertotheCityfield.
![Page 1254: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1254.jpg)
ExampleThisexampledisplaystheleastprofitablecityineachstate.
SubLeastProfitableByState()
DimptViewDimptConstantsDimfldFilterField
SetptConstants=PivotTable1.Constants
'SetavariabletotheactiveviewofthePivotTablelist.SetptView=PivotTable1.ActiveView
'Setavariabletothefieldthatistobefiltered.SetfldFilterField=PivotTable1.ActiveData.RowAxis.Fields("StoreCity")
'Filterthestoresbasedonprofit.SetfldFilterField.FilterOn=ptView.Totals("Profit")
'Setthefunctionusedtofilterthestores.fldFilterField.FilterFunction=ptConstants.plFilterFunctionBottomCount
'Displaytheleastprofitablestore.fldFilterField.FilterFunctionValue=1
'Setthecontextofthefilter.Althoughwearefilteringbasedon'theStoreCityfield,settingthefiltercontexttotheStoreState'fieldmeansthattheleastprofitablestorefromeachstatewillbe'displayed.SetptView.FieldSets("Store").Fields("StoreCity").FilterContext=_
![Page 1255: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1255.jpg)
ptView.FieldSets("Store").Fields("StoreState")
EndSub
![Page 1256: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1256.jpg)
FilterCrossJoinsProperty
ReturnsorsetsaBooleanthatdetermineshowthePivotTablecontrolprocessesemptymemberswhenretrievingthedataforthecurrentview.ThedefaultvalueisTrue.Read/write.
expression.FilterCrossJoins
expressionRequired.AnexpressionthatreturnsaPivotViewobject.
![Page 1257: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1257.jpg)
RemarksInmostcases,donotwanttosetthispropertytoFalse.However,ifyourOLAPcubecontainsafieldsetwherethetopmemberisempty,thenyoumaywanttosetthispropertytoFalse.
![Page 1258: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1258.jpg)
ShowAll
![Page 1259: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1259.jpg)
FilterFunctionProperty
FilterFunctionpropertyasitappliestothePivotFieldobject.
FilterFunctionpropertyasitappliestotheCriteriaobject.
![Page 1260: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1260.jpg)
FilterFunctionValueProperty
ReturnsorsetsaVariantrepresentingthevalueusedtofilterafield.ThetypeofvaluewillvarybasedonthecurrentsettingoftheFilterFunctionproperty.Usethefollowingtabletodetermineanappropriatevalueforthisproperty.Read/write.
FilterFunctionsetting AppropriatevaluerangeplFilterFunctionBottomCount Integervaluerepresentinghowmany
ofthebottommembersthatyouwanttodisplay.
plFilterFunctionBottomPercent Doublevaluebetween0and1representingthepercentageofmembersthatyouwanttodisplay.
plFilterFunctionBottomSumplFIlterFunctionNoneplFilterFunctionTopCount Integervaluerepresentinghowmany
ofthetopmembersthatyouwanttodisplay.
plFilterFunctionTopPercent Doublevaluebetween0and1representingthepercentageofmembersthatyouwanttodisplay.
plFilterFunctionTopSum
expression.FilterFunctionValue
expressionRequired.AnexpressionthatreturnsaPivotFieldobject.
![Page 1261: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1261.jpg)
ExampleThisexampleappliesaconditionalfiltertotheStoreCityfieldbasedontheProfittotal.Thethreemostprofitablestoresaredisplayed.
SubTopThreeStores()
DimptViewDimptConstantsDimfldFilterField
SetptConstants=PivotTable1.Constants
'SetavariabletotheactiveviewofthePivotTablelist.SetptView=PivotTable1.ActiveView
'Setavariabletothefieldthatistobefiltered.SetfldFilterField=PivotTable1.ActiveData.RowAxis.Fields("StoreCity")
'Filterthestoresbasedonprofit.SetfldFilterField.FilterOn=ptView.Totals("Profit")
'Setthefunctionusedtofilterthestores.fldFilterField.FilterFunction=ptConstants.plFilterFunctionTopCount
'Displaythethreemostprofitablestores.fldFilterField.FilterFunctionValue=3
EndSub
![Page 1262: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1262.jpg)
FilterModeProperty
TrueifanyworksheetrowsarecurrentlyhiddenbyAutoFiltercriteria.ThedefaultvalueisFalse.Read-onlyBoolean.
expression.FilterMode
expressionRequired.AnexpressionthatreturnsaWorksheetobject.
![Page 1263: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1263.jpg)
RemarksIftheAutoFilterdrop-downarrowsarevisiblebutnorowsarecurrentlyfiltered(allrowsarevisible),theAutoFilterModepropertyisTrueandtheFilterModepropertyisFalse.
![Page 1264: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1264.jpg)
ExampleThisexampleturnsontheAutoFilterfortherangeA1:C20,setsfiltersforcolumnsAandC,andthenappliesthefilters.TheFilterModepropertyreturnsFalseuntiltheAutoFiltercriteriahasbeenappliedtothelist.
SubApply_AutoFilter()DimafFiltersDimafCol1DimafCol3'TurnonAutoFilter.Spreadsheet1.Worksheets("Sheet1").Range("A1:C20").AutoFilter'SetavariabletotheAutoFilterobject.SetafFilters=Spreadsheet1.Worksheets("sheet1").AutoFilterSetafCol1=afFilters.Filters(1)SetafCol3=afFilters.Filters(3)'AddacriteriathatexcludesbluefromcolumnA.afCol1.Criteria.Add"blue"'AddacriteriathatexcludesgreenfromcolumnA.afCol1.Criteria.Add"green"'Addacriteriathatexcludesyellowfromcolumnc.afCol3.Criteria.Add"yellow"'Atthispoint,theFilterModepropertyisFalse'becausetheAutoFiltercriteriahasnotbeenapplied.MsgBoxSpreadsheet1.Worksheets("Sheet1").FilterMode
![Page 1265: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1265.jpg)
'Applythecriteria.afFilters.Apply'TheFilterModepropertyisnowTruesinceyou'havehiddenseveralrowsinthelist.MsgBoxSpreadsheet1.Worksheets("Sheet1").FilterModeEndSub
![Page 1266: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1266.jpg)
FilterOnProperty
ReturnsaPivotTotalobjectthatrepresentsthetotaltousewhenconditionallyfilteringafield.
expression.FilterOn
expressionRequired.AnexpressionthatreturnsaPivotFieldobject.
![Page 1267: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1267.jpg)
ExampleThisexampleappliesaconditionalfiltertotheStoreCityfieldbasedontheProfittotal.Thethreemostprofitablestoresaredisplayed.
SubTopThreeStores()
DimptViewDimptConstantsDimfldFilterField
SetptConstants=PivotTable1.Constants
'SetavariabletotheactiveviewofthePivotTablelist.SetptView=PivotTable1.ActiveView
'Setavariabletothefieldthatistobefiltered.SetfldFilterField=PivotTable1.ActiveData.RowAxis.Fields("StoreCity")
'Filterthestoresbasedonprofit.SetfldFilterField.FilterOn=ptView.Totals("Profit")
'Setthefunctionusedtofilterthestores.fldFilterField.FilterFunction=ptConstants.plFilterFunctionTopCount
'Displaythethreemostprofitablestores.fldFilterField.FilterFunctionValue=3
EndSub
![Page 1268: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1268.jpg)
FilterOnScopeProperty
Thispropertyestablishesthescopethatisusedwhenconditionallyfilteringafield.YoucanpassaStringcontainingtheuniquenameofamemberoranarrayofuniquenamesofmembers.ReturnsaVariantarraycontainingPivotMemberobjects.Read/write.
expression.FilterOnScope
expressionRequired.AnexpressionthatreturnsaPivotFieldobject.
![Page 1269: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1269.jpg)
RemarksThescopeisbasedononeormoremembersofadifferentfieldthanthefieldthatisbeingfiltered.Forexample,youmaywanttoapplyafiltertotheCustomerfield,whichhasbeenaddedtotherowaxisofyourPivotTablelist,todisplaythethreecustomerstowhomyouhavemadethemostsales.Todothis,yousettheFilterFunctionpropertytoplFilterFunctionTopCount,theFilterFunctionValuepropertyto3,andtheFilterOnpropertytotheTotalSalestotal.ThePivotTablelistdisplaysyourthreebestcustomers.
Ifyouneedtonarrowyourquerytoamorespecificsetofcustomers,thenyouwouldusetheFilterOnScopeproperty.IfyouwanttoseetheyourtopcustomersintheSoutheastregion,thenyouwouldsettheFilterOnScopepropertytoanexpressionthatevaluatestotheSoutheastmemberintheRegionfield.
![Page 1270: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1270.jpg)
ExampleThisexampledisplayesthetwotop-sellingproductsinCanada.
SubDisplayTopTwoCanadianSellers()
DimobjPivotViewDimobjPivotDataDimfldProductName
'SetavariabletotheactiveviewofthePivotTable.SetobjPivotView=PivotTable1.ActiveView
'SetavariabletotheactivedataofthePivotTable.SetobjPivotData=PivotTable1.ActiveData
'SetavariabletotheProductNamefield,whichhasbeen'addedtotherowaxisofthePivotTablelist.SetfldProductName=objPivotData.RowAxis.Fields("ProductName")
'ThefollowingtwolinesofcodesetthePivotTablelisttofilterforthe'top2items.fldProductName.FilterFunction=PivotTable1.Constants.plFilterFunctionTopCountfldProductName.FilterFunctionValue=2
'FilterbasedontheUnitSalestotal.SetfldProductName.FilterOn=objPivotView.Totals("UnitSales")
'SetthefilterscopetoincludeonlysalesinCanada.fldProductName.FilterOnScope=objPivotView.FieldSets("Store").Member.ChildMembers("Canada").UniqueName
EndSub
![Page 1271: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1271.jpg)
![Page 1272: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1272.jpg)
FiltersProperty
ReturnstheFilterscollectionforthespecifiedAutoFilter.TheFilterscollectioncontainsoneFilterobjectforeachcolumninthefilteredrange.Read-only.
expression.Filters
expressionRequired.AnexpressionthatreturnsanAutoFilterobject.
![Page 1273: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1273.jpg)
ExampleThisexampleturnsontheAutoFilterfortherangeA1:C20,setsfiltersforcolumnsAandC,andthenappliesthefilters.
SubApply_AutoFilter()DimafFiltersDimafCol1DimafCol3'TurnonAutoFilter.Spreadsheet1.Worksheets("Sheet1").Range("A1:C20").AutoFilter'SetavariabletotheAutoFilterobject.SetafFilters=Spreadsheet1.Worksheets("sheet1").AutoFilterSetafCol1=afFilters.Filters(1)SetafCol3=afFilters.Filters(3)'AddacriteriathatexcludesbluefromcolumnA.afCol1.Criteria.Add"blue"'AddacriteriathatexcludesgreenfromcolumnA.afCol1.Criteria.Add"green"'Addacriteriathatexcludesyellowfromcolumnc.afCol3.Criteria.Add"yellow"'Applythecriteria.afFilters.ApplyEndSub
![Page 1274: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1274.jpg)
![Page 1275: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1275.jpg)
ShowAll
![Page 1276: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1276.jpg)
FindAxisMemberProperty
Findsanaxismember,givenareferencetothemember.ReturnsaPivotAxisMemberobject.
expression.FindAxisMember(Path,Format)
expressionRequired.AnexpressionthatreturnsaPivotAxisMemberobject.
PathRequiredString.Avariableorstringthatcontainsareferencetothemembertofind.
FormatRequiredPivotMemberFindFormatEnum.IndicatestheformatusedforthePathargument.
![Page 1277: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1277.jpg)
RemarksIftherequestedmemberisnotfound,aPivotAxisMemberobjectwiththeIsValidpropertysettoFalseisreturned.Thisallowsyoutorefertoamemberthatmightlaterbeaddedtotheschema.
Thispropertycanbeusedtofindamemberfromthetopmemberofthespecifiedaxis.UsetheMemberproperty(PivotAxisMember.Axis.Member)toreturnthetopmemberofanaxis.
![Page 1278: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1278.jpg)
ShowAll
![Page 1279: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1279.jpg)
FindColumnMemberProperty
Findsacolumnmember,givenareferencetothemember.ReturnsaPivotColumnMemberobject.
expression.FindColumnMember(Path,Format)
expressionRequired.AnexpressionthatreturnsaaPivotColumnMemberobject.
PathRequiredString.Avariableorstringthatcontainsareferencetothemembertofind.
FormatRequiredPivotMemberFindFormatEnum.IndicatestheformatusedforthePathargument.
![Page 1280: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1280.jpg)
RemarksIftherequestedmemberisnotfound,aPivotColumnMemberobjectwiththeIsValidpropertysettoFalseisreturned.Thisallowsyoutorefertoamemberthatmightlaterbeaddedtotheschema.
Thispropertycanbeusedtofindamemberfromthetopmemberofthecolumnaxis.UsetheMemberpropertytoreturnthetopmemberofthecolumnaxis.
![Page 1281: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1281.jpg)
ShowAll
![Page 1282: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1282.jpg)
FindMemberProperty
FindMemberpropertyasitappliestothePivotFieldSetobject.
FindMemberpropertyasitappliestothePivotAxisMember,PivotColumnMember,PivotMember,PivotPageMember,andPivotRowMemberobjects.
![Page 1283: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1283.jpg)
RemarksIftherequestedmemberisnotfound,aPivotMemberobjectwiththeIsValidpropertysettoFalseisreturned.Thisallowsyoutorefertoamemberthatmightlaterbeaddedtotheschema.
![Page 1284: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1284.jpg)
ExampleThisexampleattemptstofindaspecificwarehouseintheWarehousefieldset.Theuserisalertedifthespecifiedwarehouseisnotfound.
SubFindWarehouse()
DimptViewDimptConstantsDimfsWarehouseDimpmFound
SetptConstants=PivotTable1.Constants
'Setavariabletotheactiveview.SetptView=PivotTable1.ActiveView
'SetavariabletotheWarehousefieldset.SetfsWarehouse=ptView.FieldSets("Warehouse")
'SetavariabletotheresultsoftheFindMemberproperty.SetpmFound=fsWarehouse.FindMember("QualityDistribution,Inc.",ptConstants.plFindFormatMember)
'Checktoseeifthememberwasfound.IfpmFound.IsValid=FalseThen
'Alerttheuserifthememberwasnotfound.MsgBox"Thespecifiedmemberdoesnotexist."
EndIf
EndSub
![Page 1285: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1285.jpg)
![Page 1286: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1286.jpg)
ShowAll
![Page 1287: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1287.jpg)
FindPageMemberProperty
Findsapagemember,givenareferencetothemember.ReturnsaPivotPageMemberobject.
expression.FindPageMember(Path,Format)
expressionRequired.AnexpressionthatreturnsaPivotPageMemberobject.
PathRequiredString.Avariableorstringthatcontainsareferencetothemembertothemembertofind.
FormatRequiredPivotMemberFindFormatEnum.IndicatestheformatusedforthePathargument.
![Page 1288: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1288.jpg)
RemarksIftherequestedmemberisnotfound,aPivotPageMemberobjectwiththeIsValidpropertysettoFalseisreturned.Thisallowsyoutorefertoamemberthatmightlaterbeaddedtotheschema.
Thispropertycanbeusedtofindamemberfromthetopmemberofthepageaxis.UsetheMemberpropertytoreturnthetopmemberofthepageaxis.
![Page 1289: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1289.jpg)
ShowAll
![Page 1290: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1290.jpg)
FindRowMemberProperty
Findsarowmember,givenareferencetothemember.ReturnsaPivotRowMemberobject.
expression.FindRowMember(Path,Format)
expressionRequired.AnexpressionthatreturnsaPivotRowMemberobject.
PathRequiredString.Avariableorstringthatcontainsareferencetothemembertofind.
FormatRequiredPivotMemberFindFormatEnum.IndicatestheformatusedforthePathargument.
![Page 1291: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1291.jpg)
RemarksIftherequestedmemberisnotfound,aPivotRowMemberobjectwiththeIsValidpropertysettoFalseisreturned.Thisallowsyoutorefertoamemberthatmightlaterbeaddedtotheschema.
![Page 1292: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1292.jpg)
FirstSectionProperty
ReturnsaSectionobjectthatrepresentsthefirstsectiononthespecifieddataaccesspage.Read-only.
expression.FirstSection
expressionRequired.AnexpressionthatreturnsaDataPageobject.
![Page 1293: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1293.jpg)
FirstSliceAngleProperty
Returnsorsetstheangleofthefirstpie-chartordoughnut-chartslice,indegrees(clockwisefromvertical).Appliesonlytopieanddoughnutcharts.Read/writeLong.
expression.FirstSliceAngle
expressionRequired.AnexpressionthatreturnsaChChartobject.
![Page 1294: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1294.jpg)
ExampleThisexamplesetstheangleofthefirstpie-chartordoughnut-chartsliceto45degrees.Charts(0)mustrefertoapieordoughnutchart.
ChartSpace1.Charts(0).FirstSliceAngle=45
![Page 1295: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1295.jpg)
FloorProperty
ReturnsaChSurfaceobjectthatrepresentsthefloorofathree-dimensionalchart.UsethepropertiesandmethodsofthereturnedChSurfaceobjecttoformatthefloorofthespecifiedchart.
expression.Floor
expressionRequired.AnexpressionthatreturnsaChPlotAreaobject.
![Page 1296: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1296.jpg)
ExampleThisexampleconvertsthefirstchartinChartspace1toa3-DColumnchartandthenformatsthebackwall,sidewall,andfloorofthechart.
SubFormatWallsFloor()
Dimcht3DColumnDimchConstantsDimpaPlotArea
SetchConstants=Chartspace1.Constants
'SetavariabletothefirstchartinChartspace1.Setcht3DColumn=ChartSpace1.Charts(0)
'Changethecharttoa3DColumnchart.cht3DColumn.Type=chConstants.chChartTypeColumnClustered3D
'Setavariabletotheplotarea.SetpaPlotArea=cht3DColumn.PlotArea
'Formatthebackwallofthechart.paPlotArea.BackWall.Interior.SetSolid"Yellow"paPlotArea.BackWall.Thickness=5
'Formatthesidewallofthechart.paPlotArea.SideWall.Interior.SetSolid"Yellow"paPlotArea.SideWall.Thickness=5
'Formatthefloorofthechart.paPlotArea.Floor.Interior.SetSolid"Blue"
![Page 1297: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1297.jpg)
paPlotArea.Floor.Thickness=5
EndSub
![Page 1298: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1298.jpg)
FontProperty
ReturnsaChFont,Font,orPivotFontobjectthatrepresentsthefontforthespecifiedobject(thereturnedobjecttypedependsontheobjecttowhichthispropertyisapplied).
expression.Font
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1299: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1299.jpg)
ExampleThisexamplesetsthenumberformatandfontfortheactivecell.
SubSetFont()
DimrngCurrentCell
SetrngCurrentCell=Spreadsheet1.ActiveCell
rngCurrentCell.NumberFormat="0.###"
rngCurrentCell.Font.Color="Blue"
rngCurrentCell.Font.Name="TimesNewRoman"
EndSub
![Page 1300: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1300.jpg)
FontNameProperty
ReturnsorsetsthenameofthefontinthespecifiedRecordNavigationControlobject.Read/writeString.
expression.FontName
expressionRequired.AnexpressionthatreturnsaRecordNavigationControlobject.
Example
Thisexamplesetsthefontnameto"CourierNew"forcontrolRNC1.
RNC1.FontName="CourierNew"
![Page 1301: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1301.jpg)
ForeColorProperty
Returnsorsetstheforegroundcolorforthespecifiedobjectorarea.Whenyousetthisproperty,youcanuseeitheraLongvaluerepresentingared-green-blue(RGB)colorvalueoraStringvaluerepresentingavalidHTMLcolorvalue.Forexample,tosettheobjectcolortored,youcouldusethehexadecimalvalue&HFF,thedecimalvalue255,orthestringvalue"red."InMicrosoftVisualBasic,youcanusetheRGBfunctiontocreateanRGBcolorvalue(forexample,redisRGB(255,0,0)).Read/writeVariant.expression.ForeColor
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1302: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1302.jpg)
RemarksThispropertyalwaysreturnsthecolorasaLongvaluerepresentinganRGBcolorvalue.
![Page 1303: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1303.jpg)
ExampleThisexamplesetsthefontsize,foregroundcolor,andbackgroundcolorforthetitlebarinPivotTable1.
SubFormat_Titlebar()DimvwViewSetvwView=PivotTable1.ActiveView'Setthebackgroundcolorofthetitlebar.vwView.Label.BackColor="DarkSalmon"'Setthefontsizeofthetitlebar.vwView.Label.Font.Size=16'Settheforegroundcolorofthetitlebar.vwView.Label.ForeColor="Sienna"EndSub
![Page 1304: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1304.jpg)
FormatProperty
ReturnsorsetsaStringthatrepresentsthenumberformattingforthespecifiedelement.Read/write.
expression.Format
expressionRequired.AnexpressionthatreturnsanElementExtensionobject.
![Page 1305: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1305.jpg)
FormatMapProperty
ReturnsaChFormatMapobjectthatrepresentstheformatmapforthespecifiedseries.
expression.FormatMap
expressionRequired.AnexpressionthatreturnsaChSeriesobject.
![Page 1306: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1306.jpg)
FormulaProperty
Returnsorsetstheobject'sformulainA1-stylenotationandinthelanguageofthescript.Ifthecellcontainsaconstant,thispropertyreturnstheconstant.Ifthecellisempty,itreturnsanemptystring.Ifthecellcontainsaformula,theFormulapropertyreturnstheformulaasastringinthesameformatthatitwouldbedisplayediftheformulawerebeingactivelyedited(includingtheequalsign).
Ifyousetthevalueorformulaofacelltoadate,theSpreadsheetcomponentcheckstoseewhetherthatcellisalreadyformattedwithoneofthedateortimenumberformats.Ifnot,theSpreadsheetcomponentchangesthenumberformattothedefaultshortdatenumberformat.
Iftherangeisaoneortwo-dimensionalrange,youcansettheformulatoanarrayofthesamedimensions.Similarly,youcanputtheformulaintoanarray.
Settingtheformulaforamultiple-cellrangefillsallcellsintherangewiththeformula.Read/writeVariant.
expression.Formula
expressionRequired.AnexpressionthatreturnsaRangeobject.
![Page 1307: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1307.jpg)
ExampleThisexamplesetstheformula,columnwidth,andnumberformatforcellB5onSheet1inSpreadsheet1.
SubSetFormula()DimrngRandomNum
'SetavariabletocellB5onSheet1.SetrngRandomNum=Spreadsheet1.Worksheets("Sheet1").Range("B5")
'InsertaformulaintocellB5.rngRandomNum.Formula="=5*RAND()"
'SetthenumberformatforcellB5.rngRandomNum.NumberFormat="#.###"
'AutofitcolumnB.rngRandomNum.Columns.AutoFit
EndSub
![Page 1308: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1308.jpg)
FormulaArrayProperty
ReturnsorsetsaVariantrepresentingthearrayformulaofarange.Returns(orcanbesetto)asingleformulaoraVisualBasicarray.Ifthespecifiedrangedoesn'tcontainanarrayformula,thispropertyreturnsanullstring("").Read/write.
expression.FormulaArray
expressionRequired.AnexpressionthatreturnsaRangeobject.
![Page 1309: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1309.jpg)
ExampleThisexampleentersthearrayformula=SUM(A1:A3)incellsE1:E3ontheactiveworksheet.
Spreadsheet1.ActiveSheet.Range("E1:E3").FormulaArray=_"=SUM(A1:A3)"
![Page 1310: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1310.jpg)
FormulaLocalProperty
Returnsorsetstherangeformulainthelanguagethattheuserisworkingin.Ifthecellcontainsaconstant,thispropertyreturnstheconstant.Ifthecellisempty,itreturnsanemptystring.Ifthecellcontainsaformula,theFormulapropertyreturnstheformulaasastringinthesameformatthatitwouldbedisplayediftheformulawerebeingactivelyedited(includingtheequalsign).
Ifyousetthevalueorformulaofacelltoadate,theSpreadsheetcomponentcheckstoseewhetherthatcellisalreadyformattedwithoneofthedateortimenumberformats.Ifnot,theSpreadsheetcomponentchangesthenumberformattothedefaultshortdatenumberformat.
Iftherangeisaoneortwo-dimensionalrange,youcansettheformulatoanarrayofthesamedimensions.Similarly,youcanputtheformulaintoanarray.
Settingtheformulaforamultiple-cellrangefillsallcellsintherangewiththeformula.Read/writeVariant.
expression.FormulaLocal
expressionRequired.AnexpressionthatreturnsaRangeobject.
![Page 1311: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1311.jpg)
ExampleThisexampledisplaystheformulaintheactivecellofSpreadsheet1inthelanguageoftheuser.
MsgBoxSpreadsheet1.ActiveCell.FormulaLocal
![Page 1312: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1312.jpg)
FreezePanesProperty
SetthispropertytoTruetocreatepanesintheactiveworksheet.Thepanesarecreatedaboveandtotheleftoftheactivecell.Forexample,settingthispropertytoTruewhilecellD5istheactivecellresultsinahorizontalpanebetweenrows4and5andaverticalpanebetweencolumnsCandD.SetthispropertytoFalsetoremoveallpanesfromaworksheet.Read/writeBoolean.
expression.FreezePanes
expressionRequired.AnexpressionthatreturnsaWindowobject.
![Page 1313: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1313.jpg)
ExampleThisexamplecreatespanesintheactiveworksheet.
Spreadsheet1.ActiveWindow.FreezePanes=True
![Page 1314: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1314.jpg)
ShowAll
![Page 1315: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1315.jpg)
FunctionProperty
Returnsorsetsthefunctiontobeusedforgeneratingaggregatevalues.Read/writePivotTotalFunctionEnum.
expression.Function
expressionRequired.AnexpressionthatreturnsaPivotTotalobject.
![Page 1316: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1316.jpg)
RemarksTheSumoperatoristhedefaultvaluefornumericdatatypes.TheCountoperatoristhedefaultvalueforotherdatatypes.
![Page 1317: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1317.jpg)
GapDepthProperty
ReturnsorsetsaLongspecifyingtheamountofspacingalongthez-axisforadjacentdataseriesinathree-dimensionalchart.Validvaluesrangefrom0to500.Read/write.
expression.GapDepth
expressionRequired.AnexpressionthatreturnsaChChartobject.
![Page 1318: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1318.jpg)
RemarksSettingthispropertytoavalueof100resultsinthegapsthatarethesamethicknessasthedataseriesseries.
![Page 1319: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1319.jpg)
ExampleThisexampleconvertsthefirstchartinChartspace1toa3-DColumnchartandthensetsthegapdepthofthechart.
SubSetGapDepth()
Dimcht3DColumnAsChChart
'SetavariabletothefirstchartinChartspace1.Setcht3DColumn=ChartSpace1.Charts(0)
'Changethecharttoa3-DColumnchart.cht3DColumn.Type=chChartTypeColumn3D
'Setthegapdepth.cht3DColumn.GapDepth=75
EndSub
![Page 1320: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1320.jpg)
GapWidthProperty
Returnsorsetstheamountofspacingbetweenmarkersinadjacentcategories,asapercentageofthecolumnwidth.Avalueofzeroprovidesnospacebetweenadjacentcategorymarkers,whilepositivevaluescreateagap.Read/writeLong.
expression.GapWidth
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1321: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1321.jpg)
ExampleThisexamplesetsthespacingbetweenmarkersinadjacentcategoriesto250points.
ChartSpace1.Charts(0).GapWidth=250
![Page 1322: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1322.jpg)
GradientDegreeProperty
ReturnsaDoubleindicatingthegradientdegreeofthespecifiedshadedfillasavaluefrom0.0(dark)through1.0(light).Read-only.
expression.GradientDegree
expressionRequired.AnexpressionthatreturnsaChInteriorobject.
![Page 1323: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1323.jpg)
RemarksUsetheSetOneColorGradientmethodtosetthegradientdegreeforaChInteriorobject.
![Page 1324: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1324.jpg)
ShowAll
![Page 1325: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1325.jpg)
GradientStyleProperty
ReturnsaChartGradientStyleEnumconstantindicatingthegradientstyleforthespecifiedChInteriorobject.Read-only.
expression.GradientStyle
expressionRequired.AnexpressionthatreturnsaChInteriorobject.
![Page 1326: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1326.jpg)
RemarksUsetheSetPresetGradient,SetOneColorGradientorSetTwoColorGradientmethodtosetthegradientstyleforaChInteriorobject.
![Page 1327: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1327.jpg)
ShowAll
![Page 1328: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1328.jpg)
GradientVariantProperty
ReturnsaChartGradientVariantEnumconstantindicatingtheshadevariantforthespecifiedChInteriorobject.Read-only.
expression.GradientVariant
expressionRequired.AnexpressionthatreturnsaChInteriorobject.
![Page 1329: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1329.jpg)
RemarksUsetheOneColorGradientorTwoColorGradientmethodtosetthegradientvariantforaChInteriorobject.
![Page 1330: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1330.jpg)
GridlineColorProperty
ReturnsorsetsthegridlinecolorasanRGBvalue.Read/writeLong.
expression.GridlineColor
expressionRequired.AnexpressionthatreturnsaWindowobject.
![Page 1331: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1331.jpg)
ExampleThefollowingexamplesetsthegridlinecoloroftheactivewindowinSpreadsheet1toRed.
Spreadsheet1.ActiveWindow.GridlineColor=RGB(255,0,0)
![Page 1332: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1332.jpg)
ShowAll
![Page 1333: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1333.jpg)
GridlineColorIndexProperty
Returnsorsetsthegridlinecolorasanindexintothecurrentcolorpalette,orasanXlColorIndexconstant.Read/write.
expression.GridlineColorIndex
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1334: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1334.jpg)
RemarksSetthispropertytoxlColorIndexAutomatictospecifytheautomaticcolor.
Thefollowingillustrationshowsthecolor-indexvaluesinthedefaultcolorpalette.
![Page 1335: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1335.jpg)
ExampleThisexamplesetsthegridlinecolorintheactivewindowofSpreadsheet1toblue.
Spreadsheet1.ActiveWindow.GridlineColorIndex=5
![Page 1336: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1336.jpg)
GridXProperty
Returnsorsetsthenumberofdottedgridlinesperinchonthex-axisinthespecifieddataaccesspage’sdesignerdefaultsection.Read/writeLong.
expression.GridX
expressionRequired.AnexpressionthatreturnsaDataSourceControlobject.
![Page 1337: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1337.jpg)
GridYProperty
Returnsorsetsthenumberofdottedgridlinesperinchonthey-axisinthespecifieddataaccesspage’sdesignerdefaultsection.Read/writeLong.
expression.GridY
expressionRequired.AnexpressionthatreturnsaDataSourceControlobject.
![Page 1338: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1338.jpg)
GroupedAutoFitProperty
Trueifthespecifiedfield'scolumnwidthissetautomaticallywhenthefieldisusedontherowaxisorthecolumnaxis.Tosetthewidthofafield'scolumn,setthepropertytoFalse.Then,settheGroupedWidthpropertyofthefieldtothedesiredwidth.ThedefaultvalueisTrue.Read/writeBoolean.
expression.GroupedAutoFit
expressionRequired.AnexpressionthatreturnsaPivotFieldobject.
![Page 1339: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1339.jpg)
ExampleThisexampledisablestheGroupedAutoFitpropertyofthe"ProductName"fieldinPivotTable1andthensetsthewidthofthefieldto150pixels.
SubSet_ColumnWidth()DimfldProducts'SetavariabletotheProductNamefield.SetfldProducts=PivotTable1.ActiveView.FieldSets("ProductName").Fields(0)'SettheGroupedAutoFitfortheProductNamefield.fldProducts.GroupedAutoFit=False'SetthewidthoftheProductNamefieldto150pixels.fldProducts.GroupedWidth=150EndSub
![Page 1340: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1340.jpg)
GroupedBackColorProperty
ReturnsorsetsaVariantrepresentingthebackgroundcolorofafiledwhenithasbeengrouped.Read/write.
expression.GroupedBackColor
expressionRequired.AnexpressionthatreturnsaPivotFieldobject.
![Page 1341: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1341.jpg)
RemarksWhenyousetthisproperty,youcanuseeitheraLongvaluerepresentingared-green-bluecolorvalueoraStringvaluenamingavalidHTMLcolorvalue.Forexample,tosettheobjectcolortored,youcouldusethehexadecimalvalue&HFF,thedecimalvalue255,orthestringvalue"red."InMicrosoftVisualBasic,youcanusetheRGBfunctiontocreateared-green-bluecolorvalue(redisRGB(255,0,0)).
![Page 1342: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1342.jpg)
ExampleThisexamplegroupstheAgefieldofPivotTable1.Startingatage15,anewgroupwillbecreatedforeveryfiveyearsuntilage80.Then,thefont,foreground,background,heightandalignmentoftheresultinggroupsareformatted.
SubAddGrouping()
DimvwViewDimptConstantsDimpfGroupedField
SetptConstants=PivotTable1.Constants
'SetavariabletotheactiveviewofthePivotTable.SetvwView=PivotTable1.ActiveView'SetavariabletotheAgefield.SetpfGroupedField=vwView.FieldSets("Age").Fields("Age")'SettheGroupOnpropertysothattheAgefieldwillbe'groupedbytheGroupIntervalsetting.pfGroupedField.GroupOn=ptConstants.plGroupOnInterval
'Createanewgroupingforeveryfiveyears.pfGroupedField.GroupInterval=5
'Startthegroupingatage15.pfGroupedField.GroupStart=15
'Endthegroupingatage80.pfGroupedField.GroupEnd=80
![Page 1343: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1343.jpg)
'Setthefontforthefieldwhenitisgrouped.pfGroupedField.GroupedFont.Bold=True
'Settheforegroundcolorforthefieldwhenitisgrouped.pfGroupedField.GroupedForeColor="Black"
'SettheBackgroundcolorforthefieldwhenitisgrouped.pfGroupedField.GroupedBackColor="Blue"
'Settheheightforthefieldwhenitisgrouped.pfGroupedField.GroupedHeight=15
'Setthehorizontalalignmentforthefieldwhenitisgrouped.pfGroupedField.GroupedHAlignment=ptConstants.plHAlignRightEndSub
![Page 1344: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1344.jpg)
GroupedFontProperty
ReturnsaPivotFontobjectthatrepresentsthefontforthespecifiedfieldwhenithasbeengrouped.
expression.GroupedFont
expressionRequired.AnexpressionthatreturnsaPivotFieldobject.
![Page 1345: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1345.jpg)
ExampleThisexamplegroupstheAgefieldofPivotTable1.Startingatage15,anewgroupwillbecreatedforeveryfiveyearsuntilage80.Then,thefont,foreground,background,heightandalignmentoftheresultinggroupsareformatted.
SubAddGrouping()
DimvwViewDimptConstantsDimpfGroupedField
SetptConstants=PivotTable1.Constants
'SetavariabletotheactiveviewofthePivotTable.SetvwView=PivotTable1.ActiveView'SetavariabletotheAgefield.SetpfGroupedField=vwView.FieldSets("Age").Fields("Age")'SettheGroupOnpropertysothattheAgefieldwillbe'groupedbytheGroupIntervalsetting.pfGroupedField.GroupOn=ptConstants.plGroupOnInterval
'Createanewgroupingforeveryfiveyears.pfGroupedField.GroupInterval=5
'Startthegroupingatage15.pfGroupedField.GroupStart=15
'Endthegroupingatage80.pfGroupedField.GroupEnd=80
![Page 1346: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1346.jpg)
'Setthefontforthefieldwhenitisgrouped.pfGroupedField.GroupedFont.Bold=True
'Settheforegroundcolorforthefieldwhenitisgrouped.pfGroupedField.GroupedForeColor="Black"
'SettheBackgroundcolorforthefieldwhenitisgrouped.pfGroupedField.GroupedBackColor="Blue"
'Settheheightforthefieldwhenitisgrouped.pfGroupedField.GroupedHeight=15
'Setthehorizontalalignmentforthefieldwhenitisgrouped.pfGroupedField.GroupedHAlignment=ptConstants.plHAlignRightEndSub
![Page 1347: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1347.jpg)
GroupedForeColorProperty
ReturnsorsetsaVariantrepresentingtheforegroundcolorofafieldwhenithasbeengrouped.Usethispropertytosetthecolorofagroupeditem.Read/write.
expression.GroupedForeColor
expressionRequired.AnexpressionthatreturnsaPivotFieldobject.
![Page 1348: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1348.jpg)
RemarksWhenyousetthisproperty,youcanuseeitheraLongvaluerepresentingared-green-bluecolorvalueoraStringvaluenamingavalidHTMLcolorvalue.Forexample,tosettheobjectcolortored,youcouldusethehexadecimalvalue&HFF,thedecimalvalue255,orthestringvalue"red."InMicrosoftVisualBasic,youcanusetheRGBfunctiontocreateared-green-bluecolorvalue(redisRGB(255,0,0)).
![Page 1349: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1349.jpg)
ExampleThisexamplegroupstheAgefieldofPivotTable1.Startingatage15,anewgroupwillbecreatedforeveryfiveyearsuntilage80.Then,thefont,foreground,background,heightandalignmentoftheresultinggroupsareformatted.
SubAddGrouping()
DimvwViewDimptConstantsDimpfGroupedField
SetptConstants=PivotTable1.Constants
'SetavariabletotheactiveviewofthePivotTable.SetvwView=PivotTable1.ActiveView'SetavariabletotheAgefield.SetpfGroupedField=vwView.FieldSets("Age").Fields("Age")'SettheGroupOnpropertysothattheAgefieldwillbe'groupedbytheGroupIntervalsetting.pfGroupedField.GroupOn=ptConstants.plGroupOnInterval
'Createanewgroupingforeveryfiveyears.pfGroupedField.GroupInterval=5
'Startthegroupingatage15.pfGroupedField.GroupStart=15
'Endthegroupingatage80.pfGroupedField.GroupEnd=80
![Page 1350: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1350.jpg)
'Setthefontforthefieldwhenitisgrouped.pfGroupedField.GroupedFont.Bold=True
'Settheforegroundcolorforthefieldwhenitisgrouped.pfGroupedField.GroupedForeColor="Black"
'SettheBackgroundcolorforthefieldwhenitisgrouped.pfGroupedField.GroupedBackColor="Blue"
'Settheheightforthefieldwhenitisgrouped.pfGroupedField.GroupedHeight=15
'Setthehorizontalalignmentforthefieldwhenitisgrouped.pfGroupedField.GroupedHAlignment=ptConstants.plHAlignRightEndSub
![Page 1351: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1351.jpg)
ShowAll
![Page 1352: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1352.jpg)
GroupedHAlignmentProperty
ReturnsorsetsaPivotHAlignmentEnumconstantthatrepresentsthehorizontalalignmentofthespecifiedfieldwhenithasbeengrouped.Read/write.
expression.GroupedHAlignment
expressionRequired.AnexpressionthatreturnsaPivotFieldobject.
![Page 1353: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1353.jpg)
ExampleThisexamplegroupstheAgefieldofPivotTable1.Startingatage15,anewgroupwillbecreatedforeveryfiveyearsuntilage80.Then,thefont,foreground,background,heightandalignmentoftheresultinggroupsareformatted.
SubAddGrouping()
DimvwViewDimptConstantsDimpfGroupedField
SetptConstants=PivotTable1.Constants
'SetavariabletotheactiveviewofthePivotTable.SetvwView=PivotTable1.ActiveView'SetavariabletotheAgefield.SetpfGroupedField=vwView.FieldSets("Age").Fields("Age")'SettheGroupOnpropertysothattheAgefieldwillbe'groupedbytheGroupIntervalsetting.pfGroupedField.GroupOn=ptConstants.plGroupOnInterval
'Createanewgroupingforeveryfiveyears.pfGroupedField.GroupInterval=5
'Startthegroupingatage15.pfGroupedField.GroupStart=15
'Endthegroupingatage80.pfGroupedField.GroupEnd=80
![Page 1354: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1354.jpg)
'Setthefontforthefieldwhenitisgrouped.pfGroupedField.GroupedFont.Bold=True
'Settheforegroundcolorforthefieldwhenitisgrouped.pfGroupedField.GroupedForeColor="Black"
'SettheBackgroundcolorforthefieldwhenitisgrouped.pfGroupedField.GroupedBackColor="Blue"
'Settheheightforthefieldwhenitisgrouped.pfGroupedField.GroupedHeight=15
'Setthehorizontalalignmentforthefieldwhenitisgrouped.pfGroupedField.GroupedHAlignment=ptConstants.plHAlignRightEndSub
![Page 1355: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1355.jpg)
GroupedHeightProperty
ReturnsorsetsaLongthatrepresentstheheightofafieldwhenithasbeengrouped.Read/write.
expression.GroupedHeight
expressionRequired.AnexpressionthatreturnsaPivotFieldobject.
![Page 1356: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1356.jpg)
ExampleThisexamplegroupstheAgefieldofPivotTable1.Startingatage15,anewgroupwillbecreatedforeveryfiveyearsuntilage80.Then,thefont,foreground,background,heightandalignmentoftheresultinggroupsareformatted.
SubAddGrouping()
DimvwViewDimptConstantsDimpfGroupedField
SetptConstants=PivotTable1.Constants
'SetavariabletotheactiveviewofthePivotTable.SetvwView=PivotTable1.ActiveView'SetavariabletotheAgefield.SetpfGroupedField=vwView.FieldSets("Age").Fields("Age")'SettheGroupOnpropertysothattheAgefieldwillbe'groupedbytheGroupIntervalsetting.pfGroupedField.GroupOn=ptConstants.plGroupOnInterval
'Createanewgroupingforeveryfiveyears.pfGroupedField.GroupInterval=5
'Startthegroupingatage15.pfGroupedField.GroupStart=15
'Endthegroupingatage80.pfGroupedField.GroupEnd=80
![Page 1357: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1357.jpg)
'Setthefontforthefieldwhenitisgrouped.pfGroupedField.GroupedFont.Bold=True
'Settheforegroundcolorforthefieldwhenitisgrouped.pfGroupedField.GroupedForeColor="Black"
'SettheBackgroundcolorforthefieldwhenitisgrouped.pfGroupedField.GroupedBackColor="Blue"
'Settheheightforthefieldwhenitisgrouped.pfGroupedField.GroupedHeight=15
'Setthehorizontalalignmentforthefieldwhenitisgrouped.pfGroupedField.GroupedHAlignment=ptConstants.plHAlignRightEndSub
![Page 1358: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1358.jpg)
GroupedWidthProperty
Returnsorsetsthewidthofthespecifiedfield(pixels)whenthefieldisdisplayedontherowaxisorthecolumnaxis.Thedefaultvalueis50pixels.ThispropertyisignorediftheGroupedAutoFitpropertyforthespecifiedfieldissettoTrue.Read/writeLong.
expression.GroupedWidth
expressionRequired.AnexpressionthatreturnsaPivotFieldobject.
![Page 1359: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1359.jpg)
ExampleThisexampledisablestheGroupedAutoFitpropertyofthe"ProductName"fieldinPivotTable1andthensetsthewidthofthefieldto150pixels.
SubSet_ColumnWidth()DimfldProducts'SetavariabletotheProductNamefield.SetfldProducts=PivotTable1.ActiveView.FieldSets("ProductName").Fields(0)'SettheGroupedAutoFitfortheProductNamefield.fldProducts.GroupedAutoFit=False'SetthewidthoftheProductNamefieldto150pixels.fldProducts.GroupedWidth=150EndSub
![Page 1360: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1360.jpg)
GroupEndProperty
ReturnsorsetsaVariantrepresentingtheendingvalueofthegroupingintervalforthespecifiedfield.Read/write.
expression.GroupEnd
expressionRequired.AnexpressionthatreturnsaPivotFieldobject.
![Page 1361: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1361.jpg)
RemarksIfthespecifiedfieldcontainsvaluesgreaterthanthesettingforthisproperty,thenagrouptitled">=(GroupEnd+1)"iscreatedwhereGroupEndisthevaluespecifiedforthisproperty.Thisgroupwillcontainallvaluesthataregreaterthanthesettingforthisproperty.
IfthispropertyisnotsetorissettoEmpty,thenthelargestvalueinthefieldisusedastheendingvalue.
IfthecurrentsettingfortheGroupOnpropertyisplGroupOnPrefixChars,thenyouwillreceivearun-timeerrorwhenyousetthisproperty.
![Page 1362: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1362.jpg)
ExampleThisexamplegroupstheAgefieldofPivotTable1.Startingatage15,anewgroupwillbecreatedforeveryfiveyearsuntilage80.Then,thefont,foreground,background,heightandalignmentoftheresultinggroupsareformatted.
SubAddGrouping()
DimvwViewDimptConstantsDimpfGroupedField
SetptConstants=PivotTable1.Constants
'SetavariabletotheactiveviewofthePivotTable.SetvwView=PivotTable1.ActiveView'SetavariabletotheAgefield.SetpfGroupedField=vwView.FieldSets("Age").Fields("Age")'SettheGroupOnpropertysothattheAgefieldwillbe'groupedbytheGroupIntervalsetting.pfGroupedField.GroupOn=ptConstants.plGroupOnInterval
'Createanewgroupingforeveryfiveyears.pfGroupedField.GroupInterval=5
'Startthegroupingatage15.pfGroupedField.GroupStart=15
'Endthegroupingatage80.pfGroupedField.GroupEnd=80
![Page 1363: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1363.jpg)
'Setthefontforthefieldwhenitisgrouped.pfGroupedField.GroupedFont.Bold=True
'Settheforegroundcolorforthefieldwhenitisgrouped.pfGroupedField.GroupedForeColor="Black"
'SettheBackgroundcolorforthefieldwhenitisgrouped.pfGroupedField.GroupedBackColor="Blue"
'Settheheightforthefieldwhenitisgrouped.pfGroupedField.GroupedHeight=15
'Setthehorizontalalignmentforthefieldwhenitisgrouped.pfGroupedField.GroupedHAlignment=ptConstants.plHAlignRightEndSub
![Page 1364: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1364.jpg)
GroupFieldProperty
ReturnsaPivotResultGroupFieldobject.Usethepropertiesofthereturnedobjecttoaccessthesourcefieldandaxispropertiesofthespecifiedaxismember.
expression.GroupField
expressionRequired.AnexpressionthatreturnsaPivotAxisMemberobject.
![Page 1365: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1365.jpg)
GroupFieldsProperty
ReturnsthePivotResultGroupFieldscollectionforthespecifiedgroupaxis.
expression.GroupFields
expressionRequired.AnexpressionthatreturnsaPivotResultGroupAxisobject.
![Page 1366: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1366.jpg)
GroupFilterControlProperty
ReturnsorsetstheIDofthelistboxorcomboboxusedtosetcurrency.Read/writeString.
expression.GroupFilterControl
expressionRequired.AnexpressionthatreturnsaGroupLevelobject.
![Page 1367: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1367.jpg)
GroupFilterFieldProperty
Returnsorsetsthefilterstringusedbythegroupfiltercontrol(thefieldonwhichthecontrolwillsetcurrency).Thisstringmustbethenameofapagefieldinthegrouplevel'srecordsource.Read/writeString.
expression.GroupFilterField
expressionRequired.AnexpressionthatreturnsaGroupLevelobject.
![Page 1368: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1368.jpg)
GroupFooterProperty
Trueifthespecifiedsectionhasafooter.Youcansetthispropertyforanybandinglevelexcepttheinnermostone.ThedefaultvalueisFalse.Read/writeBoolean.
expression.GroupFooter
expressionRequired.AnexpressionthatreturnsaGroupLevelobject.
![Page 1369: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1369.jpg)
GroupHeaderProperty
Trueifthespecifiedsectionhasaheader.ThedefaultvalueisTrue.Read/writeBoolean.
expression.GroupHeader
expressionRequired.AnexpressionthatreturnsaGroupLevelobject.
![Page 1370: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1370.jpg)
GroupingDefsProperty
ReturnstheGroupingDefscollectionforthespecifiedrecordsetdefinition.ThiscollectioncontainstheGroupingDefobjectsthatcreategroupinglevelsforthedetailrecords.
expression.GroupingDefs
expressionRequired.AnexpressionthatreturnsaRecordsetDefobject.
![Page 1371: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1371.jpg)
RemarksForinformationaboutreturningasinglememberofacollection,seeReturninganObjectfromaCollection.
![Page 1372: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1372.jpg)
ShowAll
![Page 1373: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1373.jpg)
GroupingTotalFunctionProperty
ReturnsorsetsaChartGroupingTotalFunctionEnumconstantthatrepresentsthefunctionusedtodisplaythevaluesinagroup.Read/write.
expression.GroupingTotalFunction
expressionRequired.AnexpressionthatreturnsaChAxisobject.
![Page 1374: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1374.jpg)
ExampleThisexampleconvertsthefirstchartinChartspace1toalinechart,thenformatsthecategoryaxissothatthevaluesaregroupedbymonth.Theaveragevalueofeachmonthisdisplayedonthechart.
SubFormatTimeScaling()
DimchConstantsDimaxCategory
SetchConstants=ChartSpace1.Constants
'ChangethecharttoaLinechart.ChartSpace1.Charts(0).Type=chConstants.chChartTypeLine
'Setavariabletothecategoryaxis.SetaxCategory=ChartSpace1.Charts(0).Axes(chConstants.chAxisPositionCategory)
'Specifythatyouwilldeterminethegroupingsettingsofthe'axis.Notethatthislineofcodeisnecessaryonlyifthe'GroupingTypepropertyfortheaxishasbeenpreviouslysetto'chAxisGroupingNone.axCategory.GroupingType=chConstants.chAxisGroupingManual
'Groupthecategoryaxisbymonth.axCategory.GroupingUnitType=chConstants.chAxisUnitMonth
'Createanewgroupingforeverymonth.axCategory.GroupingUnit=1
'Displaytheaverageoftheitemsineachgroup.
![Page 1375: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1375.jpg)
axCategory.GroupingTotalFunction=chConstants.chFunctionAvg
'Aticklabelisdisplayedforeverymonth.axCategory.TickLabelUnitType=chConstants.chAxisUnitMonth
'Atickmarkisdisplayedforeverythreemonths.axCategory.TickMarkUnitType=chConstants.chAxisUnitQuarter
EndSub
![Page 1376: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1376.jpg)
ShowAll
![Page 1377: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1377.jpg)
GroupingTypeProperty
ReturnsorsetsaChartAxisGroupingEnumconstantthatrepresentswhetherornottheitemsonachartaxisaregrouped,andifso,whetherthegroupingwasdoneautomatically.Read/write.
expression.GroupingType
expressionRequired.AnexpressionthatreturnsaChAxisobject.
![Page 1378: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1378.jpg)
RemarksTheChartcontrolautomaticallycreatesatimescaleandgroupsonthecategoryaxiswhenthefollowingconditionsaretrue:
TheChartcontroldetectsthatthecategoryinformationisadate.
TheChartcontrolisboundtoaPivotTablelist,andthePivotTablelistisnotboundtoanOLAPdatasource.
![Page 1379: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1379.jpg)
ExampleThisexampledisablestimescalingonthecategoryaxisofthefirstchartinChartspace1.
SubDisableTimeScaling()
DimchConstantsDimaxCategory
SetchConstants=ChartSpace1.Constants
'Setavariabletothecategoryaxis.SetaxCategory=ChartSpace1.Charts(0).Axes(chConstants.chAxisPositionTimescale)
'Disabletimescalingonthecategoryaxis.axCategory.GroupingType=chConstants.chAxisGroupingNone
EndSub
![Page 1380: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1380.jpg)
GroupingUnitProperty
ReturnsorsetsaLongvaluethatrepresentsthenumberofitemsinagroup.Read/write.
expression.GroupingUnit
expressionRequired.AnexpressionthatreturnsaChAxisobject.
![Page 1381: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1381.jpg)
ExampleThisexampleconvertsthefirstchartinChartspace1toalinechart,thenformatsthecategoryaxissothatthevaluesaregroupedbymonth.Theaveragevalueofeachmonthisdisplayedonthechart.
SubFormatTimeScaling()
DimchConstantsDimaxCategory
SetchConstants=ChartSpace1.Constants
'ChangethecharttoaLinechart.ChartSpace1.Charts(0).Type=chConstants.chChartTypeLine
'Setavariabletothecategoryaxis.SetaxCategory=ChartSpace1.Charts(0).Axes(chConstants.chAxisPositionCategory)
'Specifythatyouwilldeterminethegroupingsettingsofthe'axis.Notethatthislineofcodeisnecessaryonlyifthe'GroupingTypepropertyfortheaxishasbeenpreviouslysetto'chAxisGroupingNone.axCategory.GroupingType=chConstants.chAxisGroupingManual
'Groupthecategoryaxisbymonth.axCategory.GroupingUnitType=chConstants.chAxisUnitMonth
'Createanewgroupingforeverymonth.axCategory.GroupingUnit=1
'Displaytheaverageoftheitemsineachgroup.
![Page 1382: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1382.jpg)
axCategory.GroupingTotalFunction=chConstants.chFunctionAvg
'Aticklabelisdisplayedforeverymonth.axCategory.TickLabelUnitType=chConstants.chAxisUnitMonth
'Atickmarkisdisplayedforeverythreemonths.axCategory.TickMarkUnitType=chConstants.chAxisUnitQuarter
EndSub
![Page 1383: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1383.jpg)
ShowAll
![Page 1384: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1384.jpg)
GroupingUnitTypeProperty
ReturnsorsetsaChartAxisUnitTypeEnumconstantthatrepresentshowitemsaregroupedonanaxis.
expression.GroupingUnitType
expressionRequired.AnexpressionthatreturnsaChAxisobject.
![Page 1385: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1385.jpg)
RemarksSettingthispropertysetstheGroupingTypepropertytochAxisGroupingManual.
TheChartcontrolautomaticallycreatesatimescaleandgroupsonthecategoryaxiswhenthefollowingconditionsaretrue:
TheChartcontroldetectsthatthecategoryinformationisadate.
TheChartcontrolisboundtoaPivotTablelist,andthePivotTablelistisnotboundtoanOLAPdatasource.
![Page 1386: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1386.jpg)
ExampleThisexampleconvertsthefirstchartinChartspace1toalinechart,thenformatsthecategoryaxissothatthevaluesaregroupedbymonth.Theaveragevalueofeachmonthisdisplayedonthechart.
SubFormatTimeScaling()
DimchConstantsDimaxCategory
SetchConstants=ChartSpace1.Constants
'ChangethecharttoaLinechart.ChartSpace1.Charts(0).Type=chConstants.chChartTypeLine
'Setavariabletothecategoryaxis.SetaxCategory=ChartSpace1.Charts(0).Axes(chConstants.chAxisPositionCategory)
'Specifythatyouwilldeterminethegroupingsettingsofthe'axis.Notethatthislineofcodeisnecessaryonlyifthe'GroupingTypepropertyfortheaxishasbeenpreviouslysetto'chAxisGroupingNone.axCategory.GroupingType=chConstants.chAxisGroupingManual
'Groupthecategoryaxisbymonth.axCategory.GroupingUnitType=chConstants.chAxisUnitMonth
'Createanewgroupingforeverymonth.axCategory.GroupingUnit=1
'Displaytheaverageoftheitemsineachgroup.
![Page 1387: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1387.jpg)
axCategory.GroupingTotalFunction=chConstants.chFunctionAvg
'Aticklabelisdisplayedforeverymonth.axCategory.TickLabelUnitType=chConstants.chAxisUnitMonth
'Atickmarkisdisplayedforeverythreemonths.axCategory.TickMarkUnitType=chConstants.chAxisUnitQuarter
EndSub
![Page 1388: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1388.jpg)
ShowAll
![Page 1389: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1389.jpg)
GroupIntervalProperty
GroupIntervalpropertyasitappliestothePivotFieldobject.
GroupIntervalpropertyasitappliestotheGroupLevelandPageFieldobjects.
![Page 1390: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1390.jpg)
ExampleAsitappliestothePivotFieldobject.
![Page 1391: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1391.jpg)
GroupLevelProperty
ReturnstheGroupLevelobjectforthespecifieddataaccesspage.AGroupLevelobjectcorrespondstoarecordsetproducedbyarecordsetdefinitionorgroupingdefinition.Read-only.
expression.GroupLevel
expressionRequired.AnexpressionthatreturnsaDataPageobject.
![Page 1392: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1392.jpg)
GroupLevelsProperty
ReturnstheGroupLevelscollectionforthespecifieddatasourcecontrol.Read-only.
expression.GroupLevels
expressionRequired.AnexpressionthatreturnsaDataSourceControlobject.
Forinformationaboutreturningasinglememberofacollection,seeReturninganObjectfromaCollection.
![Page 1393: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1393.jpg)
ShowAll
![Page 1394: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1394.jpg)
GroupOnProperty
GroupOnpropertyasitappliestothePivotFieldobject.
![Page 1395: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1395.jpg)
GroupOnpropertyasitappliestotheGroupLevelandPageFieldobjects.
![Page 1396: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1396.jpg)
ExampleAsitappliestothePivotFieldobject.
![Page 1397: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1397.jpg)
GroupStartProperty
ReturnsorsetsaVariantrepresentingthestartingvalueofthegroupingintervalforthespecifiedfield.Read/write.
expression.GroupStart
expressionRequired.AnexpressionthatreturnsaPivotFieldobject.
![Page 1398: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1398.jpg)
RemarksIfthespecifiedfieldcontainsvaluessmallerthanthesettingforthisproperty,thenagroupentitled"<GroupStart"iscreatedwhereGroupStartisthevaluespecifiedforthisproperty.Thisgroupwillcontainallvaluesthataresmallerthanthesettingforthisproperty.
IfthispropertyisnotsetorissettoEmpty,thenthesmallestvalueinthefieldisusedasthestartingvalue.
IfthecurrentsettingfortheGroupOnpropertyisplGroupOnPrefixChars,thenyouwillreceivearun-timeerrorwhenyousetthisproperty.
![Page 1399: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1399.jpg)
ExampleThisexamplegroupstheAgefieldofPivotTable1.Startingatage15,anewgroupwillbecreatedforeveryfiveyearsuntilage80.Then,thefont,foreground,background,heightandalignmentoftheresultinggroupsareformatted.
SubAddGrouping()
DimvwViewDimptConstantsDimpfGroupedField
SetptConstants=PivotTable1.Constants
'SetavariabletotheactiveviewofthePivotTable.SetvwView=PivotTable1.ActiveView'SetavariabletotheAgefield.SetpfGroupedField=vwView.FieldSets("Age").Fields("Age")'SettheGroupOnpropertysothattheAgefieldwillbe'groupedbytheGroupIntervalsetting.pfGroupedField.GroupOn=ptConstants.plGroupOnInterval
'Createanewgroupingforeveryfiveyears.pfGroupedField.GroupInterval=5
'Startthegroupingatage15.pfGroupedField.GroupStart=15
'Endthegroupingatage80.pfGroupedField.GroupEnd=80
![Page 1400: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1400.jpg)
'Setthefontforthefieldwhenitisgrouped.pfGroupedField.GroupedFont.Bold=True
'Settheforegroundcolorforthefieldwhenitisgrouped.pfGroupedField.GroupedForeColor="Black"
'SettheBackgroundcolorforthefieldwhenitisgrouped.pfGroupedField.GroupedBackColor="Blue"
'Settheheightforthefieldwhenitisgrouped.pfGroupedField.GroupedHeight=15
'Setthehorizontalalignmentforthefieldwhenitisgrouped.pfGroupedField.GroupedHAlignment=ptConstants.plHAlignRightEndSub
![Page 1401: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1401.jpg)
ShowAll
![Page 1402: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1402.jpg)
HAlignmentProperty
Returnsorsetsthewaydataisalignedinthespecifiedlabelortotal.Read/writePivotHAlignmentEnum.
expression.HAlignment
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1403: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1403.jpg)
HasAbsoluteLabelsProperty
Returnsorsetswhetherthelegendentriesforpercentage-calculatedsegmentsaredisplayedasabsolutevaluesinthelegend.SetthispropertytoTrueinordertodisplaytheactualbeginningandendingvaluesforasegmentthatwascalculatedasapercentage.ThedefaultvalueisFalse.Read/writeBoolean.
expression.HasAbsoluteLabels
expressionRequired.AnexpressionthatreturnsaChSegmentobject.
![Page 1404: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1404.jpg)
ExampleThisexamplebindsChartspace1totheOrderDetailstableintheSQLServerNorthwinddatabase.Then,aformatmapiscreatedthatdisplaysthelargervaluesinthechartwithadarkershadeofblue.
SubWindow_Onload()
DimserSeries1DimsegSegment1AsChSegmentDimchconstants
Setchconstants=ChartSpace1.Constants
'ThefollowingtwolinesofcodebindChartspace1totheOrderDetailstableinthe'NorthwindSQLServerdatabase.ChartSpace1.ConnectionString="Provider=SQLOLEDB.1;persistSecurityInfo=TRUE;"&_"IntegratedSecurity=SSPI;InitialCatalog=Northwind;"&_"DataSource=DataServer;"ChartSpace1.DataMember="OrderDetails"
'ThefollowingtwolinesofcodebindChartspace1totheQuantityandProductIDfields'intheOrderDetailstable.ChartSpace1.SetDatachconstants.chDimCategories,chconstants.chDataBound,"ProductID"ChartSpace1.SetDatachconstants.chDimValues,chconstants.chDataBound,"Quantity"
'Createaformatmap.ChartSpace1.SetDatachconstants.chDimFormatValues,chconstants.chDataBound,"Quantity"
'SetavariabletothefirstseriesinthefirstchartinChartspace1.SetserSeries1=ChartSpace1.Charts(0).SeriesCollection(0)
![Page 1405: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1405.jpg)
'Addasegmenttotheformatmap.SetsegSegment1=serSeries1.FormatMap.Segments.Add
'Measurethesegmentboundariesbaseduponapercentage.segSegment1.Begin.ValueType=chconstants.chBoundaryValuePercentsegSegment1.End.ValueType=chconstants.chBoundaryValuePercent
'Setthebeginningvalueto0%,andtheendingvalueto100%.segSegment1.Begin.Value=0segSegment1.End.Value=1
'Formattheinteriorofthematchingvalues.segSegment1.Begin.Interior.Color="White"segSegment1.End.Interior.Color="Blue"segSegment1.HasAutoDivisions=FalsesegSegment1.HasAbsoluteLabels=TruesegSegment1.HasDiscreteDivisions=False
EndSub
![Page 1406: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1406.jpg)
HasArrayProperty
Trueifthespecifiedcellispartofanarrayformula.Read-onlyVariant.
expression.HasArray
expressionRequired.AnexpressionthatreturnsaRangeobject.
![Page 1407: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1407.jpg)
RemarksUsetheCurrentArraypropertytodeterminethethecellsthatarepartofthecurrentarray.
![Page 1408: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1408.jpg)
ExampleThisexampledetermineswhethertheactivecellinSpreadsheet1ispartofanarray.Isso,thearrayisselected.
IfSpreadsheet1.ActiveCell.HasArrayThen_Spreadsheet1.ActiveCell.CurrentArray.Select
![Page 1409: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1409.jpg)
HasAutoAspectRatioProperty
Falseiftheaspectratioofthespecifiedcharthasbeenmodified.SetthispropertytoTruetorestorethespecifiedcharttoit'sdefaultaspectratio.Read-writeBoolean.
expression.HasAutoAspectRatio
expressionRequired.AnexpressionthatreturnsaChChartobject.
![Page 1410: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1410.jpg)
ExampleThisexampleresetsthefirstchartinChartspace1toitsdefaultaspectratio.
Chartspace1.Charts(0).HasAutoAspectRatio=True
![Page 1411: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1411.jpg)
HasAutoCaptionProperty
Trueifthenameforthespecifiedtrendlineisgeneratedautomaticallyfromthetrendlinetypeandseriesindex("Poly.(Series1)",forexample).Settingthetrendline’sCaptionpropertysetsthispropertytoFalse.Read/writeBoolean.
expression.HasAutoCaption
expressionRequired.AnexpressionthatreturnsaChTrendlineobject.
![Page 1412: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1412.jpg)
ExampleThisexamplesetsthecaptionforthespecifiedtrendlinecaptionifthecaptioniscurrentlysettobegeneratedautomatically.NotethatSeriesCollection(0)mustrefertoaseriesthatalreadyhasatrendline.
SubSetCaption()DimserZeroDimtrndlineSetserZero=ChartSpace1.Charts(0).SeriesCollection(0)serZero.Line.Color="red"Settrndline=serZero.Trendlines(0)Iftrndline.HasAutoCaptionThentrndline.Caption="datatrend"EndSub
![Page 1413: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1413.jpg)
HasAutoChartDepthProperty
Falseifthedepthofthespecifiedcharthasbeenmodified.SetthispropertytoTruetorestorethespecifiedcharttoitsdefaultdepth.Read-writeBoolean.
expression.HasAutoChartDepth
expressionRequired.AnexpressionthatreturnsaChChartobject.
![Page 1414: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1414.jpg)
ExampleThisexampleresetsthefirstchartinChartspace1toit'sdefaultdepth.
Chartspace1.Charts(0).HasAutoChartDepth=True
![Page 1415: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1415.jpg)
HasAutoDivisionsProperty
Returnsorsetswhetherdivisionsareautomaticallycreatedforthespecifiedsegment.ThedefaultvalueisTrue.Read/writeBoolean.
expression.HasAutoDivisions
expressionRequired.AnexpressionthatreturnsaChSegmentobject.
![Page 1416: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1416.jpg)
ExampleThisexamplebindsChartspace1totheOrderDetailstableintheSQLServerNorthwinddatabase.Then,aformatmapiscreatedthatdisplaysthelargervaluesinthechartwithadarkershadeofblue.
SubWindow_Onload()
DimserSeries1DimsegSegment1AsChSegmentDimchconstants
Setchconstants=ChartSpace1.Constants
'ThefollowingtwolinesofcodebindChartspace1totheOrderDetailstableinthe'NorthwindSQLServerdatabase.ChartSpace1.ConnectionString="Provider=SQLOLEDB.1;persistSecurityInfo=TRUE;"&_"IntegratedSecurity=SSPI;InitialCatalog=Northwind;"&_"DataSource=DataServer;"ChartSpace1.DataMember="OrderDetails"
'ThefollowingtwolinesofcodebindChartspace1totheQuantityandProductIDfields'intheOrderDetailstable.ChartSpace1.SetDatachconstants.chDimCategories,chconstants.chDataBound,"ProductID"ChartSpace1.SetDatachconstants.chDimValues,chconstants.chDataBound,"Quantity"
'Createaformatmap.ChartSpace1.SetDatachconstants.chDimFormatValues,chconstants.chDataBound,"Quantity"
'SetavariabletothefirstseriesinthefirstchartinChartspace1.SetserSeries1=ChartSpace1.Charts(0).SeriesCollection(0)
![Page 1417: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1417.jpg)
'Addasegmenttotheformatmap.SetsegSegment1=serSeries1.FormatMap.Segments.Add
'Measurethesegmentboundariesbaseduponapercentage.segSegment1.Begin.ValueType=chconstants.chBoundaryValuePercentsegSegment1.End.ValueType=chconstants.chBoundaryValuePercent
'Setthebeginningvalueto0%,andtheendingvalueto100%segSegment1.Begin.Value=0segSegment1.End.Value=1
'Formattheinteriorofthematchingvalues.segSegment1.Begin.Interior.Color="White"segSegment1.End.Interior.Color="Blue"
segSegment1.HasAutoDivisions=False
segSegment1.HasAbsoluteLabels=True
segSegment1.HasDiscreteDivisions=False
EndSub
![Page 1418: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1418.jpg)
HasAutoMajorUnitProperty
Trueifthemajorunitforthespecifiedaxisisdeterminedautomatically.ThedefaultvalueisTrue.Youshouldusethispropertyonlyforvalueaxes.Read/writeBoolean.
expression.HasAutoMajorUnit
expressionRequired.AnexpressionthatreturnsaChAxisobject.
![Page 1419: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1419.jpg)
ExampleThisexamplesetsthemajorunitforthespecifiedaxisifthemajorunitiscurrentlysettobedeterminedautomatically.
SubSetMajorUnit()DimchtConstantsdimaxsSetchtConstants=ChartSpace1.ConstantsSetaxs=ChartSpace1.Charts(0).Axes(chtConstants.chAxisPositionValue)Ifaxs.HasAutoMajorUnitThenaxs.MajorUnit=5000EndSub
![Page 1420: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1420.jpg)
HasAutoMaximumProperty
Trueifthemaximumscalevalueforthespecifiedaxisissettobedeterminedautomatically.ThedefaultvalueisTrue.Read/writeBoolean.
expression.HasAutoMaximum
expressionRequired.AnexpressionthatreturnsaChScalingobject.
![Page 1421: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1421.jpg)
ExampleThisexamplesetsthemaximumscalevalueforthespecifiedaxisifthemaximumvalueiscurrentlysettobedeterminedautomatically.
SubSetScale()DimchConstantsdimaxisScaleSetchConstants=ChartSpace1.ConstantsSetaxisScale=ChartSpace1.Charts(0).Axes(chConstants.chAxisPositionValue).ScalingIfaxisScale.HasAutoMaximumThenaxisScale.Maximum=50000EndSub
![Page 1422: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1422.jpg)
HasAutoMinimumProperty
Trueiftheminimumscalevalueforthespecifiedaxisissettobedeterminedautomatically.ThedefaultvalueisTrue.Read/writeBoolean.
expression.HasAutoMinimum
expressionRequired.AnexpressionthatreturnsaChScalingobject.
![Page 1423: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1423.jpg)
ExampleThisexamplesetstheminimumscalevalueforthespecifiedaxisiftheminimumvalueiscurrentlysettobedeterminedautomatically.
SubSetScaling()DimchConstantsDimaxisScaleSetchConstants=ChartSpace1.ConstantsSetaxisScale=ChartSpace1.Charts(0).Axes(chConstants.chAxisPositionValue).ScalingIfaxisScale.HasAutoMinimumThenaxisScale.Minimum=10EndSub
![Page 1424: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1424.jpg)
HasAutoMinorUnitProperty
Trueiftheminorunitforthespecifiedaxisissettobedeterminedautomatically.ThedefaultvalueisTrue.Youshouldusethispropertyonlyforvalueaxes.Read/writeBoolean.
expression.HasAutoMinorUnit
expressionRequired.AnexpressionthatreturnsaChAxisobject.
![Page 1425: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1425.jpg)
ExampleThisexamplesetstheminorunitforthespecifiedaxistoincrementsof500iftheunitiscurrentlysettobedeterminedautomatically.
SubSetMinorUnit()DimchConstantsDimaxsSetchConstants=ChartSpace1.ConstantsSetaxs=ChartSpace1.Charts(0).Axes(chConstants.chAxisPositionValue)Ifaxs.HasAutoMinorUnitThenaxs.MinorUnit=500EndSub
![Page 1426: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1426.jpg)
HasBubbleSizeProperty
Trueifeverydatalabelforthespecifiedseriesorchartcurrentlydisplaysitsbubblesize.ThedefaultvalueisFalse.Notethatthispropertyisavailableonlyforbubblecharts.Read/writeBoolean.
expression.HasBubbleSize
expressionRequired.AnexpressionthatreturnsaChDataLabelsobject.
![Page 1427: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1427.jpg)
RemarksDatalabelcomponentsarealwaysdisplayedinthefollowingorder:[SeriesName][CategoryName][Value][BubbleSize][Percentage].
![Page 1428: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1428.jpg)
ExampleThisexamplecausesthedatalabelsforthespecifiedseriestodisplaytheirbubblesize.NotethatCharts(0)mustrefertoabubblechart.
SubDisplayLabels()DimdlBubbleLabelsSetdlBubbleLabels=ChartSpace1.Charts(0).SeriesCollection(0).DataLabelsCollection.AdddlBubbleLabels.HasBubbleSize=TrueEndSub
![Page 1429: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1429.jpg)
HasCategoryNameProperty
Trueifeverydatalabelforthespecifiedseriesorchartcurrentlydisplaysitscategorynameorlabel.ThedefaultvalueisFalse.Read/writeBoolean.
expression.HasCategoryName
expressionRequired.AnexpressionthatreturnsaChDataLabelsobject.
![Page 1430: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1430.jpg)
RemarksDatalabelcomponentsarealwaysdisplayedinthefollowingorder:[SeriesName][CategoryName][Value][BubbleSize][Percentage]
![Page 1431: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1431.jpg)
ExampleThisexamplecausesthedatalabelsforthespecifiedseriestodisplaytheircategoryandseriesnames.
SubShowLabels()Dimdl
Setdl=ChartSpace1.Charts(0).SeriesCollection(0).DataLabelsCollection(0)
'Displaythecategorynames.dl.HasCategoryName=True'Displaytheseriesnames.dl.HasSeriesName=TrueEndSub
![Page 1432: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1432.jpg)
HasDetailsProperty
Trueifdetailrecordscanbedisplayedforagivencell;Falseifdetailrecordsarenotavailablefordisplay.Thispropertyisautomaticallyresetwheneverthedataisrequeried.IfthispropertyissettoFalse,theexpansionindicatorsarenotdisplayedforinnermembers.ThispropertyisalwayssettoFalseiftheproviderismultidimensional.Read-onlyBoolean.
expression.HasDetails
expressionRequired.AnexpressionthatreturnsaPivotTableobject.
![Page 1433: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1433.jpg)
HasDiscreteDivisionsProperty
Returnsorsetsthemethodusedtointerpolatetheformattingofthespecifiedsegmentbetweenitsbeginningandendingvalues.SettingthispropertytoTruecausestheChartcontroltoassignanumberofdivisionstothesegment.SettingthispropertytoFalsecausestheChartcontroltointerpolatebetweenthebeginningandendingvaluesofthesegmentwithoutcreatingdiscretedivisionsinformatting.ThedefaultvalueisFalse.Read/writeBoolean.
expression.HasDiscreteDivisions
expressionRequired.AnexpressionthatreturnsaChSegmentobject.
![Page 1434: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1434.jpg)
RemarksToillustratethedifferenceswhensettingthispropertytoTrueorFalse,assumethatyousetthefollowingpropertiesforasegment:
.Begin.Value=10
.Begin.Interior.Color="White"
.End.Value=50
.End.Interior.Color="Green"
WhensettingthispropertytoTrue,theChartcontrolwouldcreateseveraldivisionswhichcontainadifferentinterpolationoftheabovecolorsettings.However,pointsthatareveryclosetoeachotherinvaluecanbeformattedverydifferentlybecauseeachpointisinadifferentdivision.Apointwithavalueof24maybewhitewhileapointwithavalueof25maybeafairlydarkshadeofgreen,becauseadivisionwascreatedbetween24and25.SettingthispropertytoFalseresultsinamoregradualinterpolationbetweenwhiteandgreen.
![Page 1435: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1435.jpg)
ExampleThisexamplebindsChartspace1totheOrderDetailstableintheSQLServerNorthwinddatabase.Then,aformatmapiscreatedthatdisplaysthelargervaluesinthechartwithadarkershadeofblue.
SubWindow_Onload()
DimserSeries1DimsegSegment1AsChSegmentDimchconstants
Setchconstants=ChartSpace1.Constants
'ThefollowingtwolinesofcodebindChartspace1totheOrderDetailstableinthe'NorthwindSQLServerdatabase.ChartSpace1.ConnectionString="Provider=SQLOLEDB.1;persistSecurityInfo=TRUE;"&_"IntegratedSecurity=SSPI;InitialCatalog=Northwind;"&_"DataSource=DataServer;"ChartSpace1.DataMember="OrderDetails"
'ThefollowingtwolinesofcodebindChartspace1totheQuantityandProductIDfields'intheOrderDetailstable.ChartSpace1.SetDatachconstants.chDimCategories,chconstants.chDataBound,"ProductID"ChartSpace1.SetDatachconstants.chDimValues,chconstants.chDataBound,"Quantity"
'Createaformatmap.ChartSpace1.SetDatachconstants.chDimFormatValues,chconstants.chDataBound,"Quantity"
'SetavariabletothefirstseriesinthefirstchartinChartspace1.SetserSeries1=ChartSpace1.Charts(0).SeriesCollection(0)
![Page 1436: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1436.jpg)
'Addasegmenttotheformatmap.SetsegSegment1=serSeries1.FormatMap.Segments.Add
'Measurethesegmentboundariesbaseduponapercentage.segSegment1.Begin.ValueType=chconstants.chBoundaryValuePercentsegSegment1.End.ValueType=chconstants.chBoundaryValuePercent
'Setthebeginningvalueto0%,andtheendingvalueto100%.segSegment1.Begin.Value=0segSegment1.End.Value=1
'Formattheinteriorofthematchingvalues.segSegment1.Begin.Interior.Color="White"segSegment1.End.Interior.Color="Blue"
segSegment1.HasAutoDivisions=False
segSegment1.HasAbsoluteLabels=True
segSegment1.HasDiscreteDivisions=False
EndSub
![Page 1437: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1437.jpg)
HasFormulaProperty
Trueifallcellsintherangecontainformulas,Falseifnonecontainformulas,andNullifsomecellscontainformulasandothersdonot.Read-onlyVariant.UsetheIsNullfunctiontodetermineifthereturnvalueisNull.
expression.HasFormula
expressionRequired.AnexpressionthatreturnsaRangeobject.
![Page 1438: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1438.jpg)
ExampleThisexamplerecalculatestheactiveworksheetifanycellinthecurrentlyselectedrangecontainsaformula.
SubCalcIfSelectionHasFormulas()DimvntHasFormulaDimrngCurrentSetrngCurrent=Spreadsheet1.Selection'SetavariabletotheHasFormulaproperty'forthecurrentselection.vntHasFormula=rngCurrent.HasFormulaIfIsNull(vntHasFormula)Then'Calculatetheactiveworksheetifthe'selectioncontainsoneormoreformulas.Spreadsheet1.ActiveSheet.CalculateElseIfvntHasFormulaThen'Calculatetheactiveworksheetifall'selectedcellscontainaformula.Spreadsheet1.ActiveSheet.CalculateEndIfEndSub
![Page 1439: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1439.jpg)
HasLegendProperty
Trueifthespecifiedcharthasalegend.Read/writeBoolean.
expression.HasLegend
expressionRequired.AnexpressionthatreturnsaChChartobject.
![Page 1440: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1440.jpg)
ExampleThisexamplesetsthespecifiedcharttohavealegend.
ChartSpace1.Charts(0).HasLegend=True
![Page 1441: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1441.jpg)
HasMajorGridlinesProperty
Trueifthespecifiedaxishasmajorgridlines.Notethatanyaxiscanhavegridlines.Read/writeBoolean.
expression.HasMajorGridlines
expressionRequired.AnexpressionthatreturnsaChAxisobject.
![Page 1442: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1442.jpg)
ExampleThisexampleturnsonthemajorandminorgridlinesonthefirstchartinChartSpace1.
SubEnableGridlines()DimchConstantsDimaxValueAxisSetchConstants=ChartSpace1.Constants'Setavariabletorefertothevalueaxis.SetaxValueAxis=ChartSpace1.Charts(0).Axes(chConstants.chAxisPositionValue)'Enablethemajorgridlinesonthevalueaxis.axValueAxis.HasMajorGridlines=True'Enablethemajorgridlinesonthevalueaxis.axValueAxis.HasMinorGridlines=TrueEndSub
![Page 1443: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1443.jpg)
HasMinorGridlinesProperty
Trueifthespecifiedaxishasminorgridlines.Notethatanyaxiscanhavegridlines.Read/writeBoolean.
expression.HasMinorGridlines
expressionRequired.AnexpressionthatreturnsaChAxisobject.
![Page 1444: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1444.jpg)
ExampleThisexampleturnsonthemajorandminorgridlinesonthefirstchartinChartSpace1.
SubEnableGridlines()DimchConstantsDimaxValueAxisSetchConstants=ChartSpace1.Constants'Setavariabletorefertothevalueaxis.SetaxValueAxis=ChartSpace1.Charts(0).Axes(chConstants.chAxisPositionValue)'Enablethemajorgridlinesonthevalueaxis.axValueAxis.HasMajorGridlines=True'Enablethemajorgridlinesonthevalueaxis.axValueAxis.HasMinorGridlines=TrueEndSub
![Page 1445: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1445.jpg)
HasMultipleChartsProperty
ReturnsorsetsaBooleanthatindicateswhetherthespecifiedChartSpacecontainsmultiplecharts.ThedefaultvalueisFalse.Read/write.
expression.HasMultipleCharts
expressionRequired.AnexpressionthatreturnsaChartSpaceobject.
![Page 1446: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1446.jpg)
HasPassiveAlertsProperty
Returnsorsetswhetherpassivealertsaretobeusedwhenanon-criticalerrorinencountered.ThedefaultvalueisTrue.Read/writeBoolean.
expression.HasPassiveAlerts
expressionRequired.AnexpressionthatreturnsaChartspaceobject.
![Page 1447: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1447.jpg)
RemarksPassivealertsarepresentedasasmallexclamationsymbolinthelowerleftcornerofthechartcontrol.Clickingthesymboldisplaysmoreinformationaboutthenon-criticalerrorthathasoccurred.ThisfeatureissimilartotheMicrosoftInternetExplorerfeatureofdisplayinganalertsymbolinthestatusbarwhenscripterrorshaveoccurred.
![Page 1448: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1448.jpg)
HasPercentageProperty
Trueifeverydatalabelforthespecifiedseriesorchartcurrentlydisplaysitspercentagevalue.ThedefaultvalueisFalse.Thispropertyisavailableonlyforpie,doughnut,andstackedcharts.Read/writeBoolean.
expression.HasPercentage
expressionRequired.AnexpressionthatreturnsaChDataLabelsobject.
![Page 1449: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1449.jpg)
RemarksDatalabelcomponentsarealwaysdisplayedinthefollowingorder:[SeriesName][CategoryName][Value][BubbleSize][Percentage].
![Page 1450: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1450.jpg)
ExampleThisexampleaddsdatalabelsshowingpercentagevaluetoaseries.NotethatCharts(0)mustrefertoapie,doughnut,orstackedchart.
SubAddPercentabeLabels()DimdlSetdl=ChartSpace1.Charts(0).SeriesCollection(0).DataLabelsCollection.Add'Displaypercentagelabels.dl.HasPercentage=TrueEndSub
![Page 1451: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1451.jpg)
HasPlotDetailsProperty
Trueifdetailfieldswillbeplottedwhenthechartdoesnotcontainacategoryfield.ThedefaultvalueisFalse.Read/writeBoolean.
expression.HasPlotDetails
expressionRequired.AnexpressionthatreturnsaChartSpaceobject.
![Page 1452: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1452.jpg)
ExampleThisexampleenablesdetailfieldsinChartSpace1tobeplottedwhenthechartdoesnotcontainacategoryfield.
ChartSpace1.HasPlotDetails=True
![Page 1453: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1453.jpg)
HasRuntimeSelectionProperty
Returnsorsetstheselectionmodeinthechartsofthespecifiedchartcontrol.WhenthispropertyisTrue,thefirstclickselectstheinnerobject;thesecondclickselectstheouterobject.Forexample,ifthispropertyisTrueandtheuserclicksthethirddatapointinadataseries,onlythatpointisselected.Thesecondtimethattheuserclicksthedatapoint,theentiredataseriesisselected.SettingthispropertytoFalseforcestheentiredataseriestobeselectedwhentheuserclicksthethirddatapointforthefirsttime.Theuserhastoclickthethirddatapointasecondtimeinordertoselectonlythatdatapoint.ThedefaultvalueitTrue.Read/writeBoolean.
expression.HasRuntimeSelection
expressionRequired.AnexpressionthatreturnsaChartSpaceobject.
![Page 1454: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1454.jpg)
HasSelectionMarksProperty
SetthispropertytoTruetodisplayselectionmarkswhentheuserselectsanitemonachart.ThedefaultvalueisFalse.Read/writeBoolean.
expression.HasSelectionMarks
expressionRequired.AnexpressionthatreturnsaChartSpaceobject.
![Page 1455: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1455.jpg)
RemarksInadditiontosettingthispropertytoTrue,youmustalsosettheAllowPropertyToolboxpropertytoTruetoallowtheusertoformatindividualchartelements.
![Page 1456: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1456.jpg)
ExampleThisexampleenablestheusertoselectandformatindividualchartelementsinChartspace1.
SubAllow_Formatting()
'AllowtheusertodisplaytheCommandsandOptionsdialogbox.Chartspace1.AllowPropertyToolbox=True
'Displayselectionmarksforchartelements.Chartspace1.HasSelectionMarks=True
EndSub
![Page 1457: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1457.jpg)
HasSeriesByRowsProperty
Returnsorsetshowseriesandcategoriesofthechartsinthespecifiedchartcontrolaremappedtotherowsandcolumnsofthedatasource.Bydefault,ifthechartisboundtoarelationaldatasource,thentheseriesofthechartcorrespondtothecolumnsoftheunderlyingPivotTablelist.ThedefaultvalueisFalse.Read/writeBoolean.
expression.HasSeriesByRows
expressionRequired.AnexpressionthatreturnsaChartSpacecontrol.
![Page 1458: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1458.jpg)
HasSeriesNameProperty
Trueifeverydatalabelforthespecifiedseriesorchartcurrentlydisplaysitsseriesname.ThedefaultvalueisFalse.Thispropertyisavailableonlyforpie,doughnut,andstackedcharts.Read/writeBoolean.
expression.HasSeriesName
expressionRequired.AnexpressionthatreturnsaChDataLabelsobject.
![Page 1459: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1459.jpg)
RemarksDatalabelcomponentsarealwaysdisplayedinthefollowingorder:[SeriesName][CategoryName][Value][BubbleSize][Percentage].
![Page 1460: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1460.jpg)
ExampleThisexamplecausesthedatalabelsforthespecifiedseriestodisplaytheircategoryandseriesnames.
SubShowLabels()Dimdl
Setdl=ChartSpace1.Charts(0).SeriesCollection(0).DataLabelsCollection(0)
'Displaythecategorynames.dl.HasCategoryName=True'Displaytheseriesnames.dl.HasSeriesName=TrueEndSub
![Page 1461: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1461.jpg)
HasSplitProperty
TrueifthescaleforthespecifiedaxishasasplitpointbetweenthevalueofitsSplitMinimumpropertyandthevalueofitsSplitMaximumproperty.ThedefaultvalueisFalse.Read/writeBoolean.
expression.HasSplit
expressionRequired.AnexpressionthatreturnsaChScalingobject.
![Page 1462: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1462.jpg)
ExampleThisexamplesplitsthevalueaxisofthefirstchartinChartSpace1andsetsthesplitminimumandsplitmaximumvalues.Thevalueaxisissplit,andvaluesbetween1000and5000willnotbedisplayed.
SubSplit_Value_Axis()DimchConstantsDimscValueAxisSetchConstants=ChartSpace1.Constants'Setavariabletothescalingobjectofthevalueaxis.SetscValueAxis=ChartSpace1.Charts(0).Axes(chConstants.chAxisPositionValue).Scaling'Addasplittothevalueaxis.scValueAxis.HasSplit=True'Specifytheminnimumvalueofthesplit.scValueAxis.SplitMinimum=1000'Specifythemaximumvalueforthesplit.scValueAxis.SplitMaximum=5000EndSub
![Page 1463: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1463.jpg)
HasTickLabelsProperty
Trueifthespecifiedaxishasalabelateachmajortickmark.ThedefaultvalueisTrue.Read/writeBoolean.
expression.HasTickLabels
expressionRequired.AnexpressionthatreturnsaChAxisobject.
![Page 1464: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1464.jpg)
ExampleThisexampleturnsofftick-marklabelsonthecategoryaxisonthefirstchartinChartSpace1.
SubDisableTickLabels()DimchConstantsSetchConstants=ChartSpace1.Constants'Turnoffthetickmarklabelsonthecategoryaxis.ChartSpace1.Charts(0).Axes(chConstants.chAxisPositionCategory).HasTickLabelsEndSub
![Page 1465: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1465.jpg)
HasTitleProperty
Trueifthespecifiedchartoraxishasatitle.ThedefaultvalueisFalse.Read/writeBoolean.
expression.HasTitle
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1466: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1466.jpg)
ExampleThisexamplecausesthetitleofthespecifiedcharttobedisplayedandsetsthetitlefont.
SubSetChartTitle()
'EnablethecharttitleforthefirstchartinChartSpace1.ChartSpace1.Charts(0).HasTitle=True'Setthetitlecaption.ChartSpace1.Charts(0).Title.Caption="MonthlySales"'Setthetitlefont.ChartSpace1.Charts(0).Title.Font.Name="timesnewroman"EndSub
![Page 1467: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1467.jpg)
HasUnifiedScalesProperty
Trueifallchartsinthespecifiedchartcontrolusethesamescalingfortheiraxes.ThedefaultvalueisFalse.Read/writeBoolean.
expression.HasUnifiedScales
expressionRequired.AnexpressionthatreturnsaChartSpaceobject.
![Page 1468: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1468.jpg)
RemarksThispropertywillreturnarun-timeerrorwhenthechartcontrolcontainsmultiplechartswithincompatibleaxes.Forexample,anerrorwillbereturnedwhenthechartcontrolcontainsanXY(Scatter)chartandaColumnchart.ThispropertycannotbesetbecauseaColumnchartcontainsacategoryaxis,andtheXY(Scatter)chartdoesnot.
WhenyouusetheAddmethodtoaddanewcharttothechartcontrolaftersettingthispropertytoTrue,thenewchart'saxesarenotautomaticallyunifiedwiththeexistingcharts.YoumustsetthispropertytoFalseandthenbacktoTruetounifythenewchart'saxeswiththeexistingcharts.
![Page 1469: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1469.jpg)
HasValueProperty
Trueifeverydatalabelforthespecifiedseriesorchartcurrentlydisplaysitsy-axisvalue.ThedefaultvalueisFalse.Read/writeBoolean.
expression.HasValue
expressionRequired.AnexpressionthatreturnsaChDataLabelsobject.
![Page 1470: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1470.jpg)
RemarksDatalabelcomponentsarealwaysdisplayedinthefollowingorder:[SeriesName][CategoryName][Value][BubbleSize][Percentage].
SettingthispropertytoTrueonascatterchartorpolarchartcausesbothx-axisvaluesandy-axisvaluestobedisplayed.
![Page 1471: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1471.jpg)
ExampleThisexamplesetsthedatalabelsforthespecifiedseriestodisplaytheiry-axisvalues.
ChartSpace1.Charts(0).SeriesCollection(0).DataLabelsCollection(0)HasValue
![Page 1472: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1472.jpg)
HeaderBackColorProperty
ReturnsorsetsaVariantindicatingthebackgroundcoloroftheheadingsinthedataareaoraniteminthefilterarea.Read/write.
expression.HeaderBackColor
expressionRequired.AnexpressionthatreturnsaPivotViewobject.
![Page 1473: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1473.jpg)
RemarksWhenyousetthisproperty,youcanuseeitheraLongvaluerepresentingared-green-bluecolorvalueoraStringvaluenamingavalidHTMLcolorvalue.Forexample,tosettheobjectcolortored,youcouldusethehexadecimalvalue&HFF,thedecimalvalue255,orthestringvalue"red."InMicrosoftVisualBasic,youcanusetheRGBfunctiontocreateared-green-bluecolorvalue(redisRGB(255,0,0)).UsetheHeaderFont,HeaderForeColor,andHeaderHAlignmentpropertiesinadditiontothispropertytoformattheheadinginthedataareaoraniteminthefilterareaofaPivotTablelist.
![Page 1474: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1474.jpg)
ExampleThisexampleformatstheheaderforthedataareaandthefilterareaofthecurrentviewinPivotTable1.
SubSetHeaderProperties()
DimptViewDimptConstants
SetptConstants=PivotTable1.Constants
'SetavariabletothecurrentPivotTableview.SetptView=PivotTable1.ActiveView
'Setthebackgroundcolor.ptView.HeaderBackColor="Gray"
'Settheforegroundcolor.ptView.HeaderForeColor="Blue"
'Setthefont.ptView.HeaderFont="Tahoma"
'Setthealignment.ptView.HeaderHAlignment=ptConstants.plHAlignLeft
EndSub
![Page 1475: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1475.jpg)
HeaderFontProperty
ReturnsaPivotFontobjectrepresentingthefontfortheheadingsinthedataareaoraniteminthefilterareaofthespecifiedview.
expression.HeaderFont
expressionRequired.AnexpressionthatreturnsaPivotViewobject.
![Page 1476: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1476.jpg)
RemarksUsetheHeaderBackColor,HeaderForeColor,andHeaderHAlignmentpropertiestoinadditiontothispropertytoformattheheadinginthedataareaoraniteminthefilterareaofaPivotTablelist.
![Page 1477: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1477.jpg)
ExampleThisexampleformatstheheaderforthedataareaandthefilterareaofthecurrentviewinPivotTable1.
SubSetHeaderProperties()
DimptViewDimptConstants
SetptConstants=PivotTable1.Constants
'SetavariabletothecurrentPivotTableview.SetptView=PivotTable1.ActiveView
'Setthebackgroundcolor.ptView.HeaderBackColor="Gray"
'Settheforegroundcolor.ptView.HeaderForeColor="Blue"
'Setthefont.ptView.HeaderFont="Tahoma"
'Setthealignment.ptView.HeaderHAlignment=ptConstants.plHAlignLeft
EndSub
![Page 1478: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1478.jpg)
HeaderForeColorProperty
ReturnsorsetsaVariantindicatingtheforegroundcoloroftheheadingsinthedataareaoraniteminthefilterareaofthespecifiedview.Read/write.
expression.HeaderForeColor
expressionRequired.AnexpressionthatreturnsaPivotViewobject.
![Page 1479: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1479.jpg)
RemarksWhenyousetthisproperty,youcanuseeitheraLongvaluerepresentingared-green-bluecolorvalueoraStringvaluenamingavalidHTMLcolorvalue.Forexample,tosettheobjectcolortored,youcouldusethehexadecimalvalue&HFF,thedecimalvalue255,orthestringvalue"red."InMicrosoftVisualBasic,youcanusetheRGBfunctiontocreateared-green-bluecolorvalue(redisRGB(255,0,0)).UsetheHeaderBackColor,HeaderFont,andHeaderHAlignmentpropertiesinadditiontothispropertytoformattheheadinginthedataareaoraniteminthefilterareaofaPivotTablelist.
![Page 1480: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1480.jpg)
ExampleThisexampleformatstheheaderforthedataareaandthefilterareaofthecurrentviewinPivotTable1.
SubSetHeaderProperties()
DimptViewDimptConstants
SetptConstants=PivotTable1.Constants
'SetavariabletothecurrentPivotTableview.SetptView=PivotTable1.ActiveView
'Setthebackgroundcolor.ptView.HeaderBackColor="Gray"
'Settheforegroundcolor.ptView.HeaderForeColor="Blue"
'Setthefont.ptView.HeaderFont="Tahoma"
'Setthealignment.ptView.HeaderHAlignment=ptConstants.plHAlignLeft
EndSub
![Page 1481: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1481.jpg)
ShowAll
![Page 1482: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1482.jpg)
HeaderHAlignmentProperty
ReturnsorsetsaPivotHAlignmentEnumconstantthatrepresentsthehorizontalalignmentofaheadinginthedataareaoraniteminthefilterareaofthespecifiedview.Read/write.
expression.HeaderHAlignment
expressionRequired.AnexpressionthatreturnsaPivotViewobject.
![Page 1483: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1483.jpg)
RemarksUsetheHeaderBackColor,HeaderForeColor,andHeaderFontpropertiesinadditiontothispropertytoformattheheadinginthedataareaoraniteminthefilterareaofaPivotTablelist.
![Page 1484: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1484.jpg)
ExampleThisexampleformatstheheaderforthedataareaandthefilterareaofthecurrentviewinPivotTable1.
SubSetHeaderProperties()
DimptViewDimptConstants
SetptConstants=PivotTable1.Constants
'SetavariabletothecurrentPivotTableview.SetptView=PivotTable1.ActiveView
'Setthebackgroundcolor.ptView.HeaderBackColor="Gray"
'Settheforegroundcolor.ptView.HeaderForeColor="Blue"
'Setthefont.ptView.HeaderFont="Tahoma"
'Setthealignment.ptView.HeaderHAlignment=ptConstants.plHAlignLeft
EndSub
![Page 1485: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1485.jpg)
HeaderHeightProperty
ReturnsaLongvaluethatrepresentstheheightoftheheadersforfieldsonthedataaxisandtheitemsinthefilterfieldofthespecifiedview.Read-only.
expression.HeaderHeight
expressionRequired.AnexpressionthatreturnsaPivotViewobject.
![Page 1486: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1486.jpg)
HeaderRowRangeProperty
ReturnsaRangeobjectthatrepresentstheheaderrowfromaspecifiedListObjectobject.Read-only.
expression.HeaderRowRange
expressionRequired.AnexpressionthatreturnsaListObjectobject.
![Page 1487: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1487.jpg)
Remarks
Ifaheaderrowispresent,aRangeobjectrepresentingtheheaderrowforthespecifiedListObjectobjectisreturned.Ifaheaderrowisn'tpresent,theNothingobjectisreturned.
![Page 1488: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1488.jpg)
ExampleTheexamplebelowsavestheheaderrowrangeinformationtoavariable.
DimrngHeaderRowRangeDimobjList SetobjList=Spreadsheet1.ActiveSheet.ListObjects(1)SetrngHeaderRowRange=objList.HeaderRowRange
![Page 1489: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1489.jpg)
HeightProperty
Returnsorsetstheheightofthespecifiedobjectinpoints.
Read-onlyDoublefortheWindowobject.
Read-onlyVariantfortheRangeobject.
Read-writeLongforthePivotAxisMember,PivotColumnMember,PivotPageMember,PivotRowMember,andPivotTableobjects.
Read-onlyLongforallotherobjectsintheAppliesTolist.
expression.Height
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1490: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1490.jpg)
RemarksTheAutoFitpropertyofthePivotTablelistissettoFalsewhenthevalueoftheHeightpropertyischanged.
![Page 1491: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1491.jpg)
ExampleThisexamplesetstheheightofthePivotTablelistto36points.
PivotTable1.Object.Height=36
![Page 1492: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1492.jpg)
HeightRatioProperty
Returnsorsetstheheightratioforthespecifiedchartinrelationtotheotherchartsinthechartworkspace.Thedefaultvalueis100.Read/writeLong.
expression.HeightRatio
expressionRequired.AnexpressionthatreturnsaChChartobject.
![Page 1493: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1493.jpg)
RemarksThispropertysetstheheightofthespecifiedchartrelativetotheheightoftheotherchartsinthechartworkspace.Forthispropertytohaveanyeffect,youmusthavemorethanonechartinthechartworkspace.Whenmorethanonechartisdisplayed,thechartsaredisplayedinagrid(formoreinformation,seetheHelptopicsfortheChartLayoutandChartWrapCountproperties).Initially,theHeightRatioandWidthRatiopropertiesaresetto100forallchartsinthegrid,andallchartsarethesamesize.
Tochangetheheightofchartsinthegrid,adjusttheHeightRatiopropertysettings.Forexample,ifeachchartisdisplayedinthreerows,allthechartshaveaninitialHeightRatiosettingof100.Ifyouwantrow3tobeonlyhalftheavailableheight,setitsHeightRatiosettingto200;theremaininghalfofthechartheightisdividedbetweenrows1and2.BecausetheheightspecifiedbytheHeightRatiopropertyisrelative,youcansetthispropertyforthethreerowsto1,1,2;100,100,200;or20,20,40,allofwhichhavethesameeffect.
Ifthechartworkspacecontainschartsdisplayedinmorethanonerow,thelargestHeightRatiosettingineachrowisusedtosettherelativeheightfortheentirerow.
Thispropertyisusefulforcreatingpriceandvolumestockchartsinwhichthevolumechartishalfthesizeofthepricechart.
![Page 1494: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1494.jpg)
HiddenProperty
Trueifthespecifiedrangeiscurrentlyhidden.Therangemustspananentirecolumnorrow.YoucanusetheEntireRowandEntireColumnpropertiestoreturnareferencetoanentireroworcolumn.Read/writeBoolean.
expression.Hidden
expressionRequired.AnexpressionthatreturnsaRangeobject.
![Page 1495: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1495.jpg)
ExampleThisexampleloopsthrougharowthatcontainsdatevalues.Whenthemonthinthecelldoesnotmatchthecurrentmonth,thecolumnishidden.Whenthemonthmatchesthecurrentmonthandthecolumnishidden,thenthecolumnisunhidden.
SubHide_Dates()DimrngLoopRangeDimrngCurrCellDimssConstants
SetssConstants=Spreadsheet1.Constants
'Setrangetoloopthroughtherangeofcontiguous'cellsinrow1startingincolumnA.SetrngLoopRange=Spreadsheet1.ActiveSheet.Range("A1",_Spreadsheet1.ActiveSheet.Range("A1").End(ssConstants.xlToRight))
'Loopthroughthecells.ForEachrngCurrCellInrngLoopRange
'Hidethecolumnifthemonthinthecurrentcelldoes'notmatchthecurrentmonth.IfMonth(rngCurrCell.Value)<>Month(Date)ThenrngCurrCell.EntireColumn.Hidden=True
'Ifthemonthinthecurrentcellmatchesthecurrentmonth'andthecolumnishidden,thenunhidethecolumn.ElseIfrngCurrCell.EntireColumn.HiddenThenrngCurrCell.EntireColumn.Hidden=FalseEndIfNext
![Page 1496: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1496.jpg)
EndSub
![Page 1497: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1497.jpg)
HoleSizeProperty
Returnsorsetstheholesizeforthespecifieddoughnutchart.Theholesizemustbeavaluefrom0through90(thedefaultvalueis50).Read/writeLong.
expression.HoleSize
expressionRequired.AnexpressionthatreturnsaChChartobject.
![Page 1498: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1498.jpg)
RemarksSettingthispropertytozero(0)changesthedoughnutcharttoapiechart(theTypepropertyfortheChChartobjectreturnschChartTypePieStacked).
![Page 1499: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1499.jpg)
ExampleThisexamplesetsholesizeforthespecifiedchart.NotethatCharts(0)mustrefertoadoughnutchart.
ChartSpace1.Charts(0).HoleSize=25
![Page 1500: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1500.jpg)
ShowAll
![Page 1501: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1501.jpg)
HorizontalAlignmentProperty
ReturnsorsetsaVariantrepresentingthehorizontalalignmentforthespecifiedrange.CanbeanXlHAlignconstant.
expression.HorizontalAlignment
expressionRequired.AnexpressionthatreturnsaRangeobject.
![Page 1502: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1502.jpg)
ExampleThisexampleleft-alignstherangeA1:A5onSheet1.
SubAlignRange()
DimssConstantsSetssConstants=Spreadsheet1.Constants
Worksheets("Sheet1").Range("A1:A5").HorizontalAlignment=ssConstants.xlHAlignLeft
EndSub
![Page 1503: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1503.jpg)
HorizontalExtentProperty
YouusetheHorizontalExtentpropertytospecifyordeterminetheextentofthehorizontalviewoftheChScrollViewobject.ReturnsaLong.Read/writeLong.
expression.HorizontalExtent
expressionRequired.AnexpressionthatreturnsaChScrollViewobject.
![Page 1504: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1504.jpg)
Remarks
YouusemethodsandpropertiesoftheChScrollViewobjecttoretrieveinformationaboutandcontroltheviewofachart.TheportionoftheChartcomponentthatdisplaysthechartitselfisthevisibleplotareaanditcandisplaytheentirechartoraportionofthechart.Whenonlyaportionofthechartisdisplayedinthevisibleplotarea,theeffectisasifyouhavezoomedinonthatportionofthechartandtheremainderofthechartiscontainedwithinavirtualplotareathatextendsbeyondtheboundaryofthevisibleplotarea.ForinformationonhowthevaluesofthepropertiesoftheChScrollViewobjectrelatetoeachother,seetheChScrollViewobjecttopic.
![Page 1505: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1505.jpg)
ExampleThefollowingexampleusestheHorizontalExtentandtheHorizontalExtentMaxpropertiestotoggleachartviewbetweenzoomedandunzoomed(horizontally).Inthisexample,theChartcomponentiscalledChartSpace1.
SubZoomView()DimlngHEM
lngHEM=Chartspace1.Charts(0).ScrollView.HorizontalExtentMax
IfChartspace1.Charts(0).ScrollView.HorizontalExtent=lngHEMThen'Zoomthechart.Chartspace1.Charts(0).ScrollView.HorizontalExtent=(lngHEM/3)Else'Zoomoutonthechart.Chartspace1.Charts(0).ScrollView.HorizontalExtent=lngHEMEndIfEndSub
![Page 1506: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1506.jpg)
HorizontalExtentMaxProperty
UsethispropertytospecifyordeterminethemaximumextentofthehorizontalviewoftheChScrollViewobject.ReturnsaLong.Read/writeLong.
expression.HorizontalExtentMax
expressionRequired.AnexpressionthatreturnsaChScrollViewobject.
![Page 1507: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1507.jpg)
Remarks
YouusemethodsandpropertiesoftheChScrollViewobjecttoretrieveinformationaboutandcontroltheviewofachart.TheportionoftheChartcomponentthatdisplaysthechartitselfisthevisibleplotareaanditcandisplaytheentirechartoraportionofthechart.Whenonlyaportionofthechartisdisplayedinthevisibleplotarea,theeffectisasifyouhavezoomedinonthatportionofthechartandtheremainderofthechartiscontainedwithinavirtualplotareathatextendsbeyondtheboundaryofthevisibleplotarea.TheHorizontalExtentMaxpropertyrepresentsthetotalheightofachartwhetherthatchartiszoomedornot.ForinformationonhowthevaluesofthepropertiesoftheChScrollViewobjectrelatetoeachother,seetheChScrollViewobjecttopic.
![Page 1508: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1508.jpg)
ExampleThefollowingexampleusestheHorizontalExtentandtheHorizontalExtentMaxpropertiestotoggleachartviewbetweenzoomedandunzoomed(horizontally).Inthisexample,theChartcomponentiscalledChartSpace1.
SubZoomView()DimlngHEM
lngHEM=Chartspace1.Charts(0).ScrollView.HorizontalExtentMax
IfChartspace1.Charts(0).ScrollView.HorizontalExtent=lngHEMThen'Zoomthechart.Chartspace1.Charts(0).ScrollView.HorizontalExtent=(lngHEM/3)Else'Zoomoutonthechart.Chartspace1.Charts(0).ScrollView.HorizontalExtent=lngHEMEndIfEndSub
![Page 1509: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1509.jpg)
HorizontalPositionProperty
YouusetheHorizontalPositionpropertytospecifyordeterminethecurrenthorizontalviewpositionoftheChScrollViewobject.ReturnsaLong.Read/writeLong.
expression.HorizontalPosition
expressionRequired.AnexpressionthatreturnsaChScrollViewobject.
![Page 1510: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1510.jpg)
Remarks
YouusemethodsandpropertiesoftheChScrollViewobjecttoretrieveinformationaboutandcontroltheviewofachart.TheportionoftheChartcomponentthatdisplaysthechartitselfisthevisibleplotareaanditcandisplaytheentirechartoraportionofthechart.Whenonlyaportionofthechartisdisplayedinthevisibleplotarea,theeffectisasifyouhavezoomedinonthatportionofthechartandtheremainderofthechartiscontainedwithinavirtualplotareathatextendsbeyondtheboundaryofthevisibleplotarea.ForinformationonhowthevaluesofthepropertiesoftheChScrollViewobjectrelatetoeachother,seetheChScrollViewobjecttopic.
TheHorizontalPositionpropertyprovidesinformationaboutthehorizontalpositionofachart.TheextremeleftoftheviewableareaoftheChartcomponentis0andtheextremerightoftheviewableareaiswherethevalueoftheHorizontalPositionpropertyequalsthevalueoftheHorizontalExtentMaxproperty(althoughyoucansetthetheHorizontalPositionpropertytovaluesgreaterthanthevalueoftheHorizontalExtentMaxpropertyoreventonegativevalues).AslongasthevalueoftheHorizontalExtentpropertyisgreaterthanthevalueoftheHorizontalExtentMaxproperty,theentirechartwillbevisible.
WhentheHorizontalPositionpropertyequalszero,theextremeleftoftheplotareawillbeattheextremeleftofthescrollviewwindow.WhentheHorizontalPositionequalsHorizontalExtentMax,theplotareaispushedtotheleftsothatrightoftheplotareaisvisibleattheleftofthescrollviewwindow.TheHorizontalPositionpropertycanbeanegativenumber.ForexampleifHorizontalPosition=(-0.25*HorizontalExtentMax)thentheplotareawillbepushedtotherightby25%ofthevirtualwidthoftheplotarea.
![Page 1511: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1511.jpg)
ExampleThefollowingexamplechangesthehorizontalandverticalpositionsofthescrollviewoftheChartcomponent(calledChartSpace1inthisexample).
DimlngHorizontalDimlngVertical
lngHorizontal=ChartSpace1.Charts(0)ScrollView.HorizontalPositionlngVertical=ChartSpace1.Charts(0)ScrollView.VerticalPosition
ChartSpace1.Charts(0)ScrollView.SetPositionlngHorizontal+300,lngVertical+200
![Page 1512: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1512.jpg)
HTMLContainerProperty
ReturnstheHTMLDIVelementthatcontainsthespecifiedsection.Read-only.
expression.HTMLContainer
expressionRequired.AnexpressionthatreturnsaSectionobject.
![Page 1513: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1513.jpg)
HTMLDataProperty
PivotTableandRangeobjects:ReturnsaStringthatrepresentsthespecifiedPivotTablelistorrangeasaproperly-formattedHTMLstring.Read-only.
Spreadsheetobject:ReturnsorsetsaStringthatrepresentsthespreadsheetdataasaproperly-formattedHTMLstring.Read/write.
expression.HTMLData
expressionRequired.AnexpressionthatreturnsoneoftheobjectintheAppliesTolist.
![Page 1514: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1514.jpg)
HTMLURLProperty
ReturnsorsetstheURL(Internetaddress)forthespreadsheetHTMLdatafile.Read/writeString.
expression.HTMLURL
expressionRequired.AnexpressionthatreturnsaSpreadsheetobject.
![Page 1515: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1515.jpg)
HwndProperty
ReturnsaLongindicatingthetop-levelwindowhandleofthePivotTablecontrol'swindow.Read-only.
expression.Hwnd
expressionRequired.AnexpressionthatreturnsaPivotTableobject.
![Page 1516: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1516.jpg)
HyperlinkProperty
PivotAxisMember,PivotColumnMember,PivotDetailCell,PivotPageMember,andPivotRowMemberobjects:ReturnsaPivotHyperlinkobjectthatrepresentsthehyperlinkforthespecifiedobject.
Rangeobject:ReturnsaHyperlinkobjectthatrepresentsthehyperlinkforthespecifiedrange.
expression.Hyperlink
expressionRequired.AnexpressionthatreturnsoneoftheobjectintheAppliesTolist.
![Page 1517: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1517.jpg)
ExampleThisexampleresolvesthehyperlinkincellB15ontheactiveworksheet,downloadsthetargetdocument,andthendisplaysthedocument.
Spreadsheet1.ActiveSheet.Range("b15").Hyperlink.Follow
![Page 1518: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1518.jpg)
InclinationProperty
ReturnsorsetsaDoubleindicatingtheinclinationoftheviewofthespecifiedthree-dimensional(3-D)chart.Validvaluesrangefrom-90to90.Read/write.
expression.Inclination
expressionRequired.AnexpressionthatreturnsaChChartobject.
![Page 1519: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1519.jpg)
RemarksSettingthispropertyto90yieldsanoverheadviewofthespecifiedchart.
![Page 1520: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1520.jpg)
ExampleThisexampleconvertsthefirstchartinChartspace1toa3-DColumnchartandthensetstheinclinationoftheview.
SubSetGapDepth()
Dimcht3DColumnAsChChart
'SetavariabletothefirstchartinChartspace1.Setcht3DColumn=ChartSpace1.Charts(0)
'Changethecharttoa3-DColumnchart.cht3DColumn.Type=chChartTypeColumn3D
'Settheinclination.cht3DColumn.Inclination=45
EndSub
![Page 1521: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1521.jpg)
ShowAll
![Page 1522: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1522.jpg)
IncludeProperty
Returnsorsetstheerrorbarelementsthatwillbeincludedonthespecifiedchart.ThedefaultvalueischErrorBarIncludeBoth.Read/writeChartErrorBarIncludeEnum.
expression.Include
expressionRequired.AnexpressionthatreturnsaChErrorBarsobject.
![Page 1523: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1523.jpg)
ExampleThisexampleaddserrorbarstothespecifiedchartandsetstheerrorbarstodisplayonlyplusvalues.
SubFormat_ErrorBars()DimchConstantsDimebErrorBarsSetchConstants=ChartSpace1.Constants'Adderrorbarstothefirstseriesinthefirstchart.SetebErrorBars=ChartSpace1.Charts(0).SeriesCollection(0).ErrorBarsCollection.Add'Includepositivevalues.ebErrorBars.Include=chConstants.chErrorBarIncludePlusValuesEndSub
![Page 1524: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1524.jpg)
IncludedMembersProperty
Returnsorsetsthememberstobedisplayedinthespecifiedfield.ThispropertycanbesettoasinglememberoraVariantarrayofmembers.ThememberscanbepassedasoneormorePivotMemberobjects,membernames,oruniquemembernames.Read/write.
expression.IncludedMembers
expressionRequired.AnexpressionthatreturnsaPivotFieldobject.
![Page 1525: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1525.jpg)
RemarksMembersnotlistedwhenyousetthispropertymaystillappearinthePivotTablelistiftheirparentmemberisincluded.Settingthispropertyclearsallprevioussettingsofthispropertyforthespecifiedfield.YoucansetthispropertytoEmpty(IncludedMembers=Empty)ortoazero-lengthVariantarray(IncludedMembers=Array())tocleartheincludedmemberslistforthespecifiedfield.
![Page 1526: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1526.jpg)
ExampleThisexamplesetstheincludedandexcludedmembersoftheStoreStateandStoreCityfieldsinPivotTable1.
SubMember_Filtering()
DimfldStoreCityDimfldStoreStateDimptView
'SetavariabletothecurrentPivotTableview.SetptView=PivotTable1.ActiveView
'SetavariabletotheStoreStatefield.SetfldStoreState=ptView.FieldSets("Store").Fields("StoreState")
'SetavariabletotheStoreCityfield.SetfldStoreCity=ptView.FieldSets("Store").Fields("StoreCity")
'ExcludeCaliforniaandWashingtonfromtheStoreStatefield.fldStoreState.ExcludedMembers=Array("CA","WA")
'IncludemembersoftheStoreCityfield.Notethatthecitiesare'instatesthathavebeenexcludedbythepreviousline.Since'StoreStateisaparenttoStoreCity,thentheexcludedstates'aredisplayedinthePivotTable.fldStoreCity.IncludedMembers=Array("LosAngeles","SanDiego",_"Seattle","Spokane")
EndSub
![Page 1527: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1527.jpg)
IndexProperty
Returnstheindexnumberofthespecifiedobjectwithinthecollectionofsimilarobjects.Read/writeLongfortheChSeriesobject;read-onlyLongforallotherobjectsintheAppliesTolist.
expression.Index
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1528: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1528.jpg)
RemarksYoucansettheindexnumberofaChSeriesobject.Thespecifiedseriesismovedtothespecifiedposition,andotherseriesarereorderedasnecessary.
TheindexvalueofaListRowobjectcorrespondstoitscurrentpositionintheXMLlist.Followingasort,orafteraddingordeletingarow,agivenrowmayhaveanewindexvaluebasedonitsnewposition.
![Page 1529: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1529.jpg)
ExampleThisexamplemovesseries1tothefourthindexpositionofanXYchartcontaining6series.Duringthemove,series2through4arereorderedtoseries1through3.Series0andseries5stayinthesameposition.
ChartSpace1.Charts(0).SeriesCollection(1).Index=4
![Page 1530: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1530.jpg)
InsertRowRangeProperty
ReturnstheRangeobjectoftheinsertrow,ifany,fromaspecifiedListObjectobject.Read-only.
expression.InsertRowRange
expressionRequired.AnexpressionthatreturnsaListObjectobject.
![Page 1531: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1531.jpg)
Remarks
SomeRangepropertiesandmethodsarenotsupported.ThepropertiesnotsupportedareLocked,MergeAreaandMergeCells.ThemethodsnotsupportedareDelete,Insert,Merge,andUnMerge.Iftheinsertrowisnotcurrentlyvisible,theNothingobjectwillbereturned.
YoucanreferenceanycellintheinsertrowusingtheInsertRowRangeproperty.PropertiesoftheborderoftheRangereturnedbytheInsertRowRangepropertyarenotsavedafteranewrowisaddedtoanXMLlist.
![Page 1532: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1532.jpg)
ExampleTheexamplebelowgetstheinsertrowrangeinformationanddisplaysit.
DimrngInsertRowDimobjListSetobjList=Spreadsheet1.Worksheets(1).ListObjects(1)
'Savetheinsertrangeinformationtoavariable.SetrngInsertRow=objList.InsertRowRange
MsgBox("Theinsertrowrangeis:"&Chr(10)&rngInsertRow.Address)
![Page 1533: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1533.jpg)
ShowAll
![Page 1534: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1534.jpg)
InteriorProperty
InteriorpropertyasitappliestotheChartSpace,ChChart,ChChartDraw,ChDataLabel,ChDataLabels,ChLegend,ChPlotArea,ChPoint,ChSegmentBoundary,ChSeries,ChSurface,andChTitleobjects.
InteriorpropertyasitappliestotheRangeandTitleBarobjects.
![Page 1535: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1535.jpg)
ExampleThisexamplesetstheinteriorcolorforthespecifiedseries.
ChartSpace1.Charts(0).SeriesCollection(0).Interior.Color="red"
![Page 1536: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1536.jpg)
InternalPivotTableProperty
ReturnsaPivotTableobjectthatisusedinternallybythechartcontroltobindtoanexternaldatasource.
expression.InternalPivotTable
expressionRequired.AnexpressionthatreturnsaChartSpaceobject.
![Page 1537: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1537.jpg)
InternationalProperty
Returnsinformationaboutthecurrentcountry/regionandinternationalsettings.Read-onlyVariant.
expression.International(Index)
expressionRequired.AnexpressionthatreturnsaSpreadsheetoraChartSpaceobject.
IndexRequiredLong.Thesettingtobereturned.CanbeoneoftheXlApplicationInternationalconstantslistedinthefollowingtable.
Index Type MeaningxlCountryCode Long Country/regionversionofthe
MicrosoftOfficeWebComponents.
xlCountrySetting Long CurrentlocalesettinginControlPanel.
xlDecimalSeparator String Decimalseparator.xlThousandsSeparator String Zeroorthousandsseparator.xlListSeparator String Listseparator.xlUpperCaseRowLetter String Uppercaserowletter(forR1C1-
stylereferences).xlUpperCaseColumnLetter String Uppercasecolumnletter.xlLowerCaseRowLetter String Lowercaserowletter.xlLowerCaseColumnLetter String Lowercasecolumnletter.xlLeftBracket String Characterusedinsteadoftheleft
bracket([)inR1C1-stylerelativereferences.
xlRightBracket String Characterusedinsteadoftherightbracket(])inR1C1-stylereferences.
xlLeftBrace String Characterusedinsteadoftheleftbrace({)inarrayliterals.
xlRightBrace String Characterusedinsteadofthe
![Page 1538: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1538.jpg)
rightbrace(})inarrayliterals.xlColumnSeparator String Characterusedtoseparate
columnsinarrayliterals.xlRowSeparator String Characterusedtoseparaterows
inarrayliterals.xlAlternateArraySeparator String Alternatearrayitemseparatorto
beusedifthecurrentarrayseparatoristhesameasthedecimalseparator.
xlDateSeparator String Dateseparator(/).xlTimeSeparator String Timeseparator(:).xlYearCode String Yearsymbolinnumberformats
(y).xlMonthCode String Monthsymbol(m).xlDayCode String Daysymbol(d).xlHourCode String Hoursymbol(h).xlMinuteCode String Minutesymbol(m).xlSecondCode String Secondsymbol(s).xlCurrencyCode String Currencysymbol.xlGeneralFormatName String NameoftheGeneralnumber
format.xlCurrencyDigits Long Numberofdecimaldigitstobe
usedincurrencyformats.xlCurrencyNegative Long Currencyformatfornegative
currencyvalues:0=(symbolx)or(xsymbol)1=-symbolxor-xsymbol2=symbol-xorx-symbol3=symbolx-orxsymbol-wheresymbolisthecurrencysymbolofthecountryorregion.NotethatthepositionofthecurrencysymbolisdeterminedbyxlCurrencyBefore.
xlNoncurrencyDigits Long Numberofdecimaldigitstobe
![Page 1539: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1539.jpg)
usedinnon-currencyformats.xlMonthNameChars Long Alwaysreturnsthreecharacters
forbackwardcompatibility.AbbreviatedmonthnamesarereadfromMicrosoftWindowsandcanbeanylength.
xlWeekdayNameChars Long Alwaysreturnsthreecharactersforbackwardcompatibility.AbbreviatedweekdaynamesarereadfromMicrosoftWindowsandcanbeanylength.
xlDateOrder Long Orderofdateelements:0=month-day-year1=day-month-year2=year-month-day
xl24HourClock Boolean Trueifyou’reusing24-hourtime;Falseifyou’reusing12-hourtime.
xlNonEnglishFunctions Boolean Trueifyou’renotdisplayingfunctionsinEnglish.
xlMetric Boolean Trueifyou’reusingthemetricsystem;Falseifyou’reusingtheEnglishmeasurementsystem.
xlCurrencySpaceBefore Boolean Trueifaspaceisaddedbeforethecurrencysymbol.
xlCurrencyBefore Boolean Trueifthecurrencysymbolprecedesthecurrencyvalues;Falseifitfollowsthem.
xlCurrencyMinusSign Boolean Trueifyou’reusingaminussignfornegativenumbers;Falseifyou’reusingparentheses.
xlCurrencyTrailingZeros Boolean Trueiftrailingzerosaredisplayedforzerocurrencyvalues.
xlCurrencyLeadingZeros Boolean Trueifleadingzerosaredisplayedforzerocurrencyvalues.
![Page 1540: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1540.jpg)
xlMonthLeadingZero Boolean Trueifaleadingzeroisdisplayedinmonths(whenmonthsaredisplayedasnumbers).
xlDayLeadingZero Boolean Trueifaleadingzeroisdisplayedindays.
xl4DigitYears Boolean Trueifyou’reusingfour-digityears;Falseifyou’reusingtwo-digityears.
xlMDY Boolean Trueifthedateorderismonth-day-yearfordatesdisplayedinthelongform;Falseifthedateorderisday-month-year.
xlTimeLeadingZero Boolean Trueifaleadingzeroisdisplayedintimes.
![Page 1541: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1541.jpg)
RemarksSymbols,separators,andcurrencyformatsshownintheprecedingtablemaydifferfromthoseusedinyourlanguageorgeographiclocationandmaynotbeavailabletoyou,dependingonthelanguagesupport(U.S.English,forexample)thatyou’veselectedorinstalled.
![Page 1542: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1542.jpg)
IsConsistentProperty
ReturnsaBooleanthatindicateswhetherthesourcedatasetisconsistentwiththespecifiedPivotDataobject.Read-only.
expression.IsConsistent
expressionRequired.AnexpressionthatreturnsaPivotDataobject.
![Page 1543: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1543.jpg)
RemarksThispropertyreturnsFalsewhenchangestothedatasethavebeencommitted,butthetotalshavenotbeenupdated.Whenthisoccurs,youcanusetheRefreshmethodofthePivotTableobjecttoupdatethetotals.
![Page 1544: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1544.jpg)
IsDataBoundProperty
ReturnsorsetsaBooleanthatdetermineswhetherthespecifiedworksheetisboundtoanoutsidedatasource.Read/write.
expression.IsDataBound
expressionRequired.AnexpressionthatreturnsaWorksheetobject.
![Page 1545: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1545.jpg)
IsDirtyProperty
ReturnsorsetsaBooleanthatindicateswhetherthePivotTablelisthaschangedsincethelasttimeitwassaved.Read/write.
expression.IsDirty
expressionRequired.AnexpressionthatreturnsaPivotTableobject.
![Page 1546: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1546.jpg)
IsDisplayingEquationProperty
Trueiftheequationforthetrendlineforthespecifiedseriesisdisplayedonthechart(inthesamedatalabelastheR-squaredvalue).ThedefaultvalueisTrue.Read/writeBoolean.
expression.IsDisplayingEquation
expressionRequired.AnexpressionthatreturnsaChTrendlineobject.
![Page 1547: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1547.jpg)
ExampleThisexampleaddsatrendlinetothespecifiedseries.Onlythetrendlineequationisdisplayed.
SubAddTrendLine()Dimtrndline'AddatrendlinetothefirstseriesinthefirstchartinChartSpace1.Settrndline=ChartSpace1.Charts(0).SeriesCollection(0).Trendlines.Add'Setthefontofthetrendlinetobold.trndline.DataLabel.Font.Bold=True'DonotdisplaytheR-Squaredvaluewiththetrendline.trndline.IsDisplayingRSquared=False'Displaytheequationforthetrendline.trndline.IsDisplayingEquation=TrueEndSub
![Page 1548: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1548.jpg)
IsDisplayingRSquaredProperty
TrueiftheR-squaredvalueforthetrendlineforthespecifiedseriesisdisplayedonthechart(inthesamedatalabelastheequation).SettingthispropertytoTrueautomaticallyturnsondatalabels.ThedefaultvalueisTrue.Read/writeBoolean.
expression.IsDisplayingRSquared
expressionRequired.AnexpressionthatreturnsaChTrendlineobject.
![Page 1549: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1549.jpg)
ExampleThisexampleaddsatrendlinetothespecifiedseries.Onlythetrendlineequationisdisplayed.
SubAddTrendLine()Dimtrndline'AddatrendlinetothefirstseriesinthefirstchartinChartSpace1.Settrndline=ChartSpace1.Charts(0).SeriesCollection(0).Trendlines.Add'Setthefontofthetrendlinetobold.trndline.DataLabel.Font.Bold=True'DonotdisplaytheR-Squaredvaluewiththetrendline.trndline.IsDisplayingRSquared=False'Displaytheequationforthetrendline.trndline.IsDisplayingEquation=TrueEndSub
![Page 1550: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1550.jpg)
IsExpandedProperty
Trueifthespecifiedsectionisexpanded.Read-onlyBoolean.
expression.IsExpanded
expressionRequired.AnexpressionthatreturnsaSectionobject.
![Page 1551: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1551.jpg)
IsFilteredProperty
Trueifthecurrentfilterisapplied.ThedefaultvalueisTrue.Read/writeBoolean.
expression.IsFiltered
expressionRequired.AnexpressionthatreturnsaPivotViewobject.
![Page 1552: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1552.jpg)
IsFilterOnProperty
Trueifthedataaccesspagefilterisapplied.Read/writeBoolean.
expression.IsFilterOn
expressionRequired.AnexpressionthatreturnsaDataPageobject.
![Page 1553: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1553.jpg)
ShowAll
![Page 1554: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1554.jpg)
IsHyperlinkProperty
IsHyperlinkpropertyasitappliestothePivotFieldobject.
IsHyperlinkpropertyasitappliestotheSchemaFieldandSchemaParameterobjects.
![Page 1555: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1555.jpg)
ExampleAsitappliestothePivotFieldobject.
![Page 1556: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1556.jpg)
IsIncludedProperty
Trueifthefieldisincludedandactiveinthespecifiedfieldset.Read/writeBoolean.
expression.IsIncluded
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1557: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1557.jpg)
RemarksInactivefieldsarenotvisibleinthePivotTablelist.AfieldsetmusthaveatleastonefieldforwhichtheIsIncludedpropertyissettoTrue.AttemptingtosetthispropertytoFalsefortheonlyfieldwhereitissettoTruegeneratesarun-timeerror.Thispropertyisignoredwhenthefieldsetisusedonthefilteraxis.Iftheuserhidesthelastfieldintheuserinterface,thefieldsetisremovedfromtheaxis.
![Page 1558: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1558.jpg)
IsTotalProperty
Trueifthespecifiedmemberisusedtodisplayasubtotal.Read-onlyBoolean.
expression.IsTotal
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1559: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1559.jpg)
IsValidProperty
ReturnsaBooleanthatindicatedwhetherthespecifiedmemberisavalidmemberwithinthespecifiedcontext.Read-only.
expression.IsValid
expressionRequired.AnexpressionthatreturnsaPivotMemberobject.
![Page 1560: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1560.jpg)
ExampleThisexampleattemptstofindaspecificwarehouseintheWarehousefieldset.Theuserisalertedifthespecifiedwarehouseisnotfound.
SubFindWarehouse()
DimptViewDimptConstantsDimfsWarehouseDimpmFound
SetptConstants=PivotTable1.Constants
'Setavariabletotheactiveview.SetptView=PivotTable1.ActiveView
'SetavariabletotheWarehousefieldset.SetfsWarehouse=ptView.FieldSets("Warehouse")
'SetavariabletotheresultsoftheFindMemberproperty.SetpmFound=fsWarehouse.FindMember("QualityDistribution,Inc.",ptConstants.plFindFormatPathName)
'Checktoseeifthememberwasfound.IfpmFound.IsValid=FalseThen
'Alerttheuserifthememberwasnotfound.MsgBox"Thespecifiedmemberdoesnotexist."
EndIf
EndSub
![Page 1561: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1561.jpg)
ItalicProperty
Trueifthefontstyleisitalic.Read/writeBooleanfortheChFontandPivotFontobjects;read/writeVariantfortheFontobject(returnsNullifsomeportionsofthetextareitalicandsomearenot).UsetheIsNullfunctiontodeterminewhetherthereturnvalueisNull.
expression.Italic
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1562: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1562.jpg)
ExampleThisexamplesetsthefonttoitalicforthecontentsofcolumnB.
Spreadsheet1.Columns(2).Font.Italic=True
![Page 1563: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1563.jpg)
ShowAll
![Page 1564: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1564.jpg)
ItemProperty
ItempropertyasitappliestotheBordersobject.
ItempropertyasitappliestotheChCategoryLabelsobject.
ItempropertyasitappliestothePivotMemberPropertiesandPivotResultMemberPropertiesobjects.
ItempropertyasitappliestotheRangeobject.
ItempropertyasitappliestotheXmlDataBindingscollection.
ItempropertyasitappliestotheXmlMapsobject.
ItempropertyasitappliestotheListObjectscollection.
ItempropertyasitappliestoallotherobjectsintheAppliesTolist.
![Page 1565: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1565.jpg)
ItemCountProperty
ReturnsaLongspecifyingthenumberofcategorylabelsforthespecifiedchartaxis.Read-only.
expression.ItemCount(Level)
expressionRequired.AnexpressionthatreturnsaChCategoryLabelsobject.
LevelOptionalLong.Thelevelofcategorylabelstoreturnthecountof.Bydefault,thecountoftheinnermostleveloflabelsisreturned.
![Page 1566: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1566.jpg)
ShowAll
![Page 1567: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1567.jpg)
JoinTypeProperty
Returnsorsetsthewayaquerywillbeformed.Read/writeDscJoinTypeEnum.
expression.JoinType
expressionRequired.AnexpressionthatreturnsaPageRelationshipobject.
![Page 1568: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1568.jpg)
RemarksYoucanusethispropertyonlyifthePageRelationshipobject'sTypepropertyissettodscLookup.
![Page 1569: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1569.jpg)
ShowAll
![Page 1570: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1570.jpg)
LabelProperty
LabelpropertyasitappliestothePivotAxis,PivotDataAxis,PivotFilterAxis,PivotGroupAxis,andPivotViewobjects.
LabelpropertyasitappliestothePivotData,PivotResultAxis,PivotResultColumnAxis,PivotResultDataAxis,PivotResultFilterAxis,PivotResultGroupAxis,PivotResultPageAxis,andPivotResultRowAxisobjects.
![Page 1571: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1571.jpg)
ShowAll
![Page 1572: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1572.jpg)
LanguageIDProperty
ReturnsaLongrepresentingthelocaleidentifier(LCID)fortheinstalllanguage,theuserinterfacelanguage,ortheHelplanguage.Read-only.
expression.LanguageID(id)
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
idRequiredMsoAppLanguageID.
![Page 1573: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1573.jpg)
ShowAll
![Page 1574: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1574.jpg)
LanguagePreferredForEditingProperty
ReturnsTrueifthevalueforthemsoLanguageIDconstanthasbeenidentifiedintheregistryasapreferredlanguageforediting.Read-onlyBoolean.
expression.LanguagePreferredForEditing(lid)
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
lidRequiredMsoLanguageID.Thelanguagetocheckforintheregistry.
![Page 1575: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1575.jpg)
RemarksYoumusttestallvalidmsoLanguageIDvaluestoenumeratethesetofpreferredlanguages.
![Page 1576: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1576.jpg)
ExampleThefollowingexampletestswhethertheU.S.Englishlanguageisregisteredasapreferrededitinglanguage.
IfSpreadsheet1.LanguageSettings._LanguagePreferredForEditing(msoLanguageIDEnglishUS)Then
MsgBox"U.S.Englishisoneofthechoseneditinglanguages."
EndIf
![Page 1577: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1577.jpg)
ShowAll
![Page 1578: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1578.jpg)
LeftProperty
LeftpropertyasitappliestotheChartSpace,ChCategoryLabel,ChChartField,ChDataLabel,ChDataLabels,ChErrorBars,ChLegendEntry,ChPoint,ChSeries,ChTrendline,PivotAggregate,PivotAxisMember,PivotColumnMember,PivotDetailCell,PivotPageMember,PivotResultAxis,PivotResultColumnAxis,PivotResultDataAxis,PivotResultFilterAxis,PivotResultGroupAxis,PivotResultLabel,PivotResultPageAxis,PivotResultRowAxis,PivotRowMember,andPivotTableobjects.
LeftpropertyasitappliestotheChScrollViewobject.
LeftpropertyasitappliestothePivotDataobject.
LeftpropertyasitappliestotheRangeobject.
LeftpropertyasitappliestotheWindowobject.
![Page 1579: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1579.jpg)
ExampleThisexamplescrollstotheleftthroughthespreadsheetwindowtodisplaycellF1ifthiscelliscurrentlytotheleftofthevisiblerange.
SubScrollSheet
DimrngScroll
SetrngScroll=Spreadsheet1.Range("f1")
IfrngScroll.Left<0ThenSpreadsheet1.ActiveSheet.ScrollrngScroll
EndSub
![Page 1580: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1580.jpg)
Left2Property
ReturnsaLongvaluethatrepresentsthedistancefromtheleftsideofthePivotTablelisttothedataarea.Thispropertyalwaysreturns1.Read-only.
expression.Left2
expressionRequired.AnexpressionthatreturnsaPivotDataobject.
![Page 1581: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1581.jpg)
LeftOffsetProperty
ReturnsorsetsaLongvaluethatrepresentsthenumberofpixelstoscrollthedataareatotheleft.Read/write.
expression.LeftOffset
expressionRequired.AnexpressionthatreturnsaPivotDataobject.
![Page 1582: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1582.jpg)
RemarksUsetheTopOffsettoscrollthedataareadown.
![Page 1583: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1583.jpg)
ExampleThisexamplescrollsthedataareaofPivotTable1down45pixelsandleft45pixels.
SubScrollDataArea()
DimptData
SetptData=PivotTable1.ActiveData
'Scroll45pixelsdown.ptData.TopOffset=45
'Scrollthedataareatotheleft.ptData.LeftOffset=45
EndSub
![Page 1584: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1584.jpg)
LegendProperty
ReturnsaChLegendobjectthatrepresentsthelegendforthespecifiedchart.
expression.Legend
expressionRequired.AnexpressionthatreturnsaChChartobject.
![Page 1585: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1585.jpg)
ExampleThisexamplecausesthespecifiedcharttodisplayitslegendandthensetsthelegendfont.
SubAddLegend()
'EnablethelegendforthefirstchartinChartspace1.ChartSpace1.Charts(0).HasLegend=True
'Setthefontforthelegend.ChartSpace1.Charts(0).Legend.Font.Name="TimesNewRoman"
EndSub
![Page 1586: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1586.jpg)
LegendEntriesProperty
ReturnsaChLegendEntriescollectionforthespecifiedlegend.
expression.LegendEntries
expressionRequired.AnexpressionthatreturnsaChLegendobject.
![Page 1587: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1587.jpg)
RemarksForinformationaboutreturningasinglememberofacollection,seeReturninganObjectfromaCollection.
![Page 1588: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1588.jpg)
ExampleThisexamplehidesthespecifiedlegendentry.
ChartSpace1.Charts(0).Legend.LegendEntries(1).Visible=False
![Page 1589: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1589.jpg)
LengthProperty
Returnsorsetsthemaximumfieldorparameterlength.Read/writeLong.
expression.Length
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1590: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1590.jpg)
LevelCountProperty
ReturnsaLongindicatingthenumberoflevelsinahierarchicalchartaxis.Read-only.
expression.LevelCount
expressionRequired.AnexpressionthatreturnsaChCategoryLabelsobject.
![Page 1591: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1591.jpg)
LightNormalProperty
ReturnsorsetsaDoublespecifyingtheamountthatthelightisbentfrom90degreesinathree-dimensional(3-D)chart.Validvaluesrangefrom0to1.Read/write.
expression.LightNormal
expressionRequired.AnexpressionthatreturnsaChChartobject.
![Page 1592: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1592.jpg)
RemarksSettingthispropertyto0resultsinaflatlookforyourchart,whilesettingthispropertyto0.5yieldsamorethree-dimensionallook.
![Page 1593: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1593.jpg)
ExampleThisexampleconvertsthefirstchartinChartspace1toa3-DColumnchartandthensetstheLightNormalpropertyofthechart.
SubSetGapDepth()
Dimcht3DColumnAsChChart
'SetavariabletothefirstchartinChartspace1.Setcht3DColumn=ChartSpace1.Charts(0)
'Changethecharttoa3-DColumnchart.cht3DColumn.Type=chChartTypeColumn3D
cht3DColumn.LightNormal=0.8
EndSub
![Page 1594: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1594.jpg)
LineProperty
ReturnsaChLineobjectthatyoucanusetochangetheappearanceofthespecifiedchartelement.
expression.Line
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1595: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1595.jpg)
RemarksWhenusedwithotherproperties,theLinepropertycanformataxes,trendlines,linesonlineorstockcharts,errorbars,andgridlines.
![Page 1596: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1596.jpg)
ExampleThisexamplesetsthelinecolorforthespecifiedseries.
ChartSpace1.Charts(0).SeriesCollection(0).Line.Color="red"
![Page 1597: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1597.jpg)
LineStyleProperty
Returnsorsetstheborderlinestyleforthespecifiedrange.CanbeoneoftheLineStyleEnumconstants;returnsNullifthebordersdonotallhavethesamestyle.UsetheIsNullfunctiontodeterminewhetherthereturnvalueisNull.Read/writeVariant.
expression.LineStyle
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1598: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1598.jpg)
RemarksYoucannotsetthispropertyforaChBorderobjectthatrepresentsachartelement.
![Page 1599: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1599.jpg)
ExampleThisexampleputsagreendash-dotborderaroundeachcellintherangeA1:E5.
SubSetBorder()
DimrngCurrentDimssConstants
SetssConstants=Spreadsheet1.Constants
SetrngCurrent=Spreadsheet1.Range("a1:e5")
rngCurrent.Borders.LineStyle=ssConstants.ssConstants.xlDashDot
rngCurrent.Borders.Color="Green"
EndSub
![Page 1600: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1600.jpg)
ListBoundFieldProperty
Returnsorsetsthefieldthatisboundinthespecifiedlistorcombobox(asopposedtothefieldthatisdisplayed).Appliesonlytolistboxesandcomboboxes.Read/writeString.
expression.ListBoundField
expressionRequired.AnexpressionthatreturnsanElementExtensionobject.
![Page 1601: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1601.jpg)
RemarksUsetheListDisplayFieldpropertytoreturnorsetthedisplayedfield.
ThispropertyisusedwiththeListRowSourceandListDisplayFieldpropertiestocontrolhowdataisdisplayedinalistboxorcombobox.Forexample,consideralistboxthatdisplaysproductnamesinasectioncalledOrderDetails.TherecordsetbehindtheOrderDetailssectionincludesafieldnamedProductIDthatrepresentstheproductforagivenOrderDetailrecord.ButinsteadofdisplayingProductIDinatextbox,thepageauthorwantstodisplayproductnamesinadropdownlistbox.ThelistboxcanbefilledwitharecordsetdefinitionnamedProductswhichcontainsfieldscalledProdIDandProductNamefromtheProducttable.Thepropertiesofthislistboxelementwouldbesetasshowninthefollowingtable.
Property ValueListRowSource ProductsListBoundField ProdIDListDisplayField ProductNameControlSource ProductID
![Page 1602: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1602.jpg)
ListDisplayFieldProperty
Returnsorsetsthefieldthatisdisplayedinthelistorcombobox(asopposedtothefieldthatisbound).Therecanbeonlyonedisplayedfield.Thispropertyappliesonlytolistboxesandcomboboxes.Read/writeString.
expression.ListDisplayField
expressionRequired.AnexpressionthatreturnsanElementExtensionobject.
![Page 1603: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1603.jpg)
RemarksUsetheListBoundFieldpropertytoreturnorsettheboundfield.
ThispropertyisusedwiththeListRowSourceandListBoundFieldpropertiestocontrolhowdataisdisplayedinalistboxorcombobox.Forexample,consideralistboxthatdisplaysproductnamesinasectioncalledOrderDetails.TherecordsetbehindtheOrderDetailssectionincludesafieldnamedProductIDthatrepresentstheproductforagivenOrderDetailrecord.ButinsteadofdisplayingProductIDinatextbox,thepageauthorwantstodisplayproductnamesinadropdownlistbox.ThelistboxcanbefilledwitharecordsetdefinitionnamedProductswhichcontainsfieldscalledProdIDandProductNamefromtheProducttable.Thepropertiesofthislistboxelementwouldbesetasshowninthefollowingtable.
Property ValueListRowSource ProductsListBoundField ProdIDListDisplayField ProductNameControlSource ProductID
![Page 1604: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1604.jpg)
ShowAll
![Page 1605: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1605.jpg)
ListObjectProperty
AsitappliestotheRangeobject.
![Page 1606: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1606.jpg)
AsitappliestotheWorkbookobject.
![Page 1607: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1607.jpg)
ExampleAsitappliestotheRangeobject.AsitappliestotheWorkbookobject.
![Page 1608: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1608.jpg)
ListObjectsProperty
ReturnstheListObjectscollectionfortheWorksheetobject.Read-only.
expression.ListObjects
expressionRequired.AnexpressionthatreturnsaWorksheetobject.
![Page 1609: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1609.jpg)
Remarks
YouusetheListObjectspropertytoreturntheListObjectscollectionforaspecifiedWorksheetobject.ThenyouiteratethroughtheListObjectscollectiontogeteachListObjectobjectonthatworksheet.
![Page 1610: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1610.jpg)
ExampleThefollowingexampleworkswitheachListObjectsobjectrelatedtoaSpreadsheetcomponent(namedSpreadsheet1).ThecodeusestheListObjectspropertyofthesecondWorksheetobjecttoreturntheListObjectscollection.ItthengetsthenameoftheListObjectobject.ThisnamecorrespondstothevalueoftheIDattributeofanMapInfo/Map/EntryintheschemamapsyntaxintheXMLSpreadsheetfile.
TheXMLfragmentwherethedetailsappearintheXMLSpreadsheetfilelookssomethinglikethefollowingfragment.Inthisexample,thenameoftheListObjectobjectisCust_MapId:
<x2:MapInfoxmlns:x2="http://schemas.microsoft.com/office/excel/2003/xml"><x2:Mapx2:ID="Cust_MapId"><x2:Entryx2:ID="example_id"x2:Type="table">...</x2:Entry></x2:Map></x2:MapInfo>
DimobjListsDimobjListDimstrName
SetobjLists=Spreadsheet1.Worksheets(2).ListObjects
ForEachobjListinobjLists'SavetheListObjectnametoavariable.strName=objList.Name
'Workwiththatparticularlistobjecthere.
![Page 1611: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1611.jpg)
Next
ThisexamplesetsthelineweightoftheborderforthespecifiedListObjectintheSpreadsheetcomponent(namedSpreadsheet1).
DimssConstants
SetssConstants=Spreadsheet1.Constants'Setavariabletotherangetoaddthebordersto.rngList=Spreadsheet1.ActiveSheet.ListObjects(1).Range'Setwholerangeborderweight.rngList.Weight=ssConstants.owcLineWeightMedium
![Page 1612: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1612.jpg)
ListRowsProperty
ReturnsaListRowscollectionthatrepresentsalltherowsofdataintheListObjectobject.Itdoesnotincludetheheaderorinsertrows.Read-only.
expression.ListRows
expressionRequired.AnexpressionthatreturnsaListObjectobject.
![Page 1613: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1613.jpg)
Remarks
YouusetheListRowspropertytoreturntheListRowscollectionforaspecifiedListObjectobject.ThenyouiteratethroughtheListRowscollectiontogeteachListRowobjectonthatworksheet.
![Page 1614: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1614.jpg)
ExampleThefollowingexampleshowsyouhowtoretrievelistrowinformationforaspecificlistrow,inthiscase,theeighthrow.
DimobjListsDimobjLRowsDimobjLRow
SetobjLists=Spreadsheet1.ActiveSheet.ListObjectsSetobjLRows=objLists.Item(1).ListRows'Savethelistrowinformationoflistrownumber8toavariable.SetobjRow=objLRows.Item(8)
'Workwiththelistrowinformationhere.
![Page 1615: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1615.jpg)
ListRowSourceProperty
Specifiesthedatasourceforalistboxorcombobox.Thispropertyappliesonlytolistboxesandcomboboxes,anditmustbesetbeforetheListBoundFieldorListDisplayFieldpropertyisset.Read/writeString.
expression.ListRowSource
expressionRequired.AnexpressionthatreturnsanElementExtensionobject.
![Page 1616: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1616.jpg)
RemarksThispropertyisusedwiththeListBoundFieldandListDisplayFieldpropertiestocontrolhowdataisdisplayedinalistboxorcombobox.Forexample,consideralistboxthatdisplaysproductnamesinasectioncalledOrderDetails.TherecordsetbehindtheOrderDetailssectionincludesafieldnamedProductIDthatrepresentstheproductforagivenOrderDetailrecord.ButinsteadofdisplayingProductIDinatextbox,thepageauthorwantstodisplayproductnamesinadropdownlistbox.ThelistboxcanbefilledwitharecordsetdefinitionnamedProductswhichcontainsfieldscalledProdIDandProductNamefromtheProducttable.Thepropertiesofthislistboxelementwouldbesetasshowninthefollowingtable.
Property ValueListRowSource ProductsListBoundField ProdIDListDisplayField ProductNameControlSource ProductID
![Page 1617: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1617.jpg)
LoadModeProperty
ReturnsanenumerationconstantthatrepresentsthenumericequivalentoftheLoadModeattributevalueofthe<Binding>elementforaparticulardatabinding.Read-onlyBindingLoadMode.
expression.LoadMode
expressionRequired.AnexpressionthatreturnsanXMLDataBindingobject.
![Page 1618: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1618.jpg)
Remarks
AnXMLDataBindingobjectcanbeabindingtoanXMLfile,anarbitrarySOAPservice,anotherWebpart(fortheSpreadsheetWebPart),oradataretrievalservice.TheLoadModepropertydescribesthebindingbehaviorforloading.ThepossibleLoadModepropertysettingsandtheirnumericequivalentareshownbelow.Ifnotprovided,adefaultof"normal"isassumed:
BindingLoadMode DescriptionNormal(0) Foraquerybinding,bindingoccursatfirstload,
whentheuserclickstheRefreshAlltoolbarbutton,RefreshcommandonthetoolstripintheSpreadsheetWebPart,ortheRefreshDatacommandonthecontextmenuintheSpreadsheetcomponent.Bindingcanbedoneprogrammaticallyaswell.
Foranupdatebinding,bindingoccurseverytimetheuserclickstheUpdateDatacommandonthetoolstripintheSpreadsheetWebPart,orwhenusingtheSaveDatacommandonthecontextmenu.Bindingcanalsooccurprogrammatically
OM(1) Foraquerybinding,bindingdoesnotoccuratfirstload,whentheuserclickstheRefreshAlltoolbarbutton,RefreshcommandonthetoolstripintheSpreadsheetWebPart,ortheRefreshDatacommandonthecontextmenuintheSpreadsheetcomponent.BindingalsodoesnotoccurwhentheRefreshmethodiscalledontheSpreadsheetobject.BindingonlyoccurswhentheRefreshmethodoftheXmlDataBindingobjectiscalled.
Foranupdatebinding,bindingdoesnotoccuratfirstload,whentheuserclickstheUpdateDatacommandonthetoolstripintheSpreadsheetWeb
![Page 1619: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1619.jpg)
Part,orwhenusingtheSaveDatacommandonthecontextmenu.BindingonlyoccurswhentheUpdatemethodoftheXmlDataBindingobjectiscalled.
Delay(2) Foraquerybinding,whentheuserclickstheRefreshAlltoolbarbutton,theRefreshcommandonthetoolstripintheSpreadsheetWebPart,ortheRefreshDatacommandonthecontextmenu.Bindingcanbedoneprogrammaticallyaswell.
Foranupdatebinding,thebehavioristhesameasdescribedfortheNormalenumeration.
![Page 1620: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1620.jpg)
ShowAll
![Page 1621: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1621.jpg)
LocationProperty
Returnsorsetsthelocationofthecalculatedfieldevaluation.Read/writeDscLocationEnum.
expression.Location
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1622: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1622.jpg)
RemarksThispropertycontrolswherecalculatedfieldsareevaluated.WhenthispropertyissettodscServer,theexpressionisincludedintheSQLstringsenttothedatabaseandmustbeinthecorrectSQLsyntaxforthedatabase.WhenthispropertyissettodscClient,theexpressionisevaluatedontheclientcomputerusingVisualBasicforApplicationsexpressions.
![Page 1623: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1623.jpg)
LockedProperty
Trueifallcellsinthespecifiedrangearelocked,Falseifnoneofthecellsarelocked,andNullifsomecellsarelockedandsomearenot.ThedefaultvalueisTrue.UsetheIsNullfunctiontodeterminewhetherthereturnvalueisNull.Read/writeVariant.
expression.Locked
expressionRequired.AnexpressionthatreturnsaRangeobject.
![Page 1624: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1624.jpg)
ExampleThisexamplelocksonlythecellsincolumnBontheactivesheetinSpreadsheet1andthenprotectstheworksheet.
SubLockColumnB()DimshtCurrentSetshtCurrent=Spreadsheet1.ActiveSheet'Clearthelockedattributeforallcellsontheactivesheet.shtCurrent.Cells.Locked=False'LockallofthecellsinColumnB.shtCurrent.Columns(2).Locked=True'Enableprotectionontheactivesheet.shtCurrent.Protection.Enabled=TrueEndSub
![Page 1625: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1625.jpg)
LogBaseProperty
Setsthebaseofthelogarithmwhenyouareusinglogscales.Attemptingtosetthispropertytoavaluelessthanorequaltozero(0)causesanerror.Read/writeDouble.
expression.LogBase
expressionRequired.AnexpressionthatreturnsaChScalingobject.
![Page 1626: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1626.jpg)
ExampleThisexamplecausesthespecifiedaxistouseabase2logarithmicscale.
SubSetScaling()
DimchConstantsDimscValueAxisScaling
SetchConstants=ChartSpace1.Constants
'Setavariabletothescalingobjectofthevalueaxis.SetscValueAxisScaling=ChartSpace1.Charts(0).Axes(chConstants.chAxisPositionValue).Scaling
'Setthescalingtype.scValueAxisScaling.Type=chConstants.chScaleTypeLogarithmic
'Setthebasevalue.scValueAxisScaling.LogBase=2
EndSub
![Page 1627: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1627.jpg)
LookupRelationshipsProperty
ReturnstheLookupRelationshipscollectionforthespecifiedpagerowsource.Read-only.
Forinformationaboutreturningasinglememberofacollection,seeReturninganObjectfromaCollection.
expression.LookupRelationships
expressionRequired.AnexpressionthatreturnsaPageRowsourceobject.
![Page 1628: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1628.jpg)
RemarksLookupRelationshipobjectsrefertorowsourcesthathaveaone-to-manyrelationshipwiththespecifiedpagerowsource.FieldsfromtheserowsourcescanappearinthesamesectionorPivotTablelistasfieldsfromthespecifiedrowsource.
![Page 1629: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1629.jpg)
LookupSchemaRelationshipsProperty
ReturnstheLookupSchemaRelationshipscollectionforthespecifiedschemarowsource.Read-only.
Forinformationaboutreturningasinglememberofacollection,seeReturninganObjectfromaCollection.
expression.LookupSchemaRelationships
expressionRequired.AnexpressionthatreturnsaSchemaRowSourceobject.
![Page 1630: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1630.jpg)
MajorGridlinesProperty
ReturnsaChGridlinesobjectthatrepresentsthemajorgridlinesforthespecifiedaxis.Notethatyoucanusegridlinesonanyaxis.Read-only.
expression.MajorGridlines
expressionRequired.AnexpressionthatreturnsaChAxisobject.
![Page 1631: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1631.jpg)
ExampleThisexamplesetsthecolorandlineweightforthegridlinesonthevalueaxisofthefirstchartinChartSpace1.
SubFormat_Gridlines()DimchConstantsDimglMajorGridlinesDimglMinorGridlines
SetchConstants=ChartSpace1.Constants
'Setavariabletothemajorgridlinesonthevalueaxis.SetglMajorGridlines=ChartSpace1.Charts(0).Axes(_chConstants.chAxisPositionValue).MajorGridlines
'Setavariabletotheminorgridlinesonthevalueaxis.SetglMinorGridlines=ChartSpace1.Charts(0).Axes(_chConstants.chAxisPositionValue).MinorGridlines
'Setthecolorandweightofthemajorgridlines.glMajorGridlines.Line.Color="white"glMajorGridlines.Line.Weight=5
'Setthecolorandweightoftheminorgridlines.glMinorGridlines.Line.Color="yellow"glMajorGridlines.Line.Weight=2EndSub
![Page 1632: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1632.jpg)
ShowAll
![Page 1633: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1633.jpg)
MajorTickMarksProperty
Returnsorsetsthemajortick-marktypeforthespecifiedaxis.Read/writeChartTickMarkEnum.
expression.MajorTickMarks
expressionRequired.AnexpressionthatreturnsaChAxisobject.
![Page 1634: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1634.jpg)
ExampleThisexampleturnsoffmajortickmarksonthespecifiedaxis.
SubDisableMajorTickMarks()DimchConstants
SetchConstants=ChartSpace1.Constants
ChartSpace1.Charts(0).Axes(chConstants.chAxisPositionLeft).MajorTickMarks=chConstants.chTickMarkNoneEndSub
![Page 1635: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1635.jpg)
MajorUnitProperty
Returnsorsetsthemajorunitforthespecifiedaxis.Usethispropertyonlywithavalueaxis.Read/writeDouble.
expression.MajorUnit
expressionRequired.AnexpressionthatreturnsaChAxisobject.
![Page 1636: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1636.jpg)
RemarksSettingthispropertycausestheHasAutoMajorUnitpropertytobesettoFalse.
![Page 1637: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1637.jpg)
ExampleThisexamplesetsthemajorandminorunitforthevalueaxis.
SubSetValueAxis()DimchConstantsDimaxValueAxis
SetchConstants=ChartSpace1.Constants
SetaxValueAxis=ChartSpace1.Charts(0).Axes(chConstants.chAxisPositionValue)
axValueAxis.MajorUnit=7axValueAxis.MinorUnit=2.5EndSub
![Page 1638: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1638.jpg)
MajorVersionProperty
ReturnsthemajorversionoftheMicrosoftOfficeWebComponentsobjectlibrary.Read-onlyLong.
expression.MajorVersion
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1639: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1639.jpg)
ExampleThisexampledisplaysthemajorversionofSpreadsheet1.
MsgboxSpreadsheet1.MajorVersion
![Page 1640: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1640.jpg)
ShowAll
![Page 1641: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1641.jpg)
ManySideProperty
ManySidepropertyasitappliestothePageRelatedFieldobject.
ManySidepropertyasitappliestothePageRelationshipobject.
ManySidepropertyasitappliestotheSchemaRelatedFieldandSchemaRelationshipobjects.
![Page 1642: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1642.jpg)
MapDataProperty
YouusetheMapDatapropertytospecifyordeterminetheschemamapforanXmlMapobject.Read/writeString.
expression.MapData
expressionRequired.AnexpressionthatreturnsanXmlMapobject.
![Page 1643: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1643.jpg)
Remarks
TheXmlMapobjectiscreatedwhenanXMLSpreadsheetfilecontainingbindingandmappinginformationisloadedintotheSpreadsheetcomponentbysettingtheXMLURLorXMLDataproperty.YoucancreateanXMLSpreadsheetfilebyimportingandmappingdatatoaworksheetusingMicrosoftOfficeExcel2003,andthensavingtheworkbookasanXMLSpreadsheetfile.SettingtheMapDatapropertywillreplaceanyexistingschemamapwiththenewschemamapyouspecify.
![Page 1644: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1644.jpg)
ExampleThefollowingexampleusestheMapDatapropertyoftheXmlMapobjecttoreturntheschemamap:
DimobjMapDimstrMapData
ForEachobjMapinSpreadsheet1.ActiveWorkbook.XmlMaps'Savethexmlmapinformationtoavariable.strMapData=objMap.MapData'Workwithmapinfoxmlhere.Next
ThenextexampleisafunctionthatsetstheMapDataproperty:
FunctionChangeMapSchema(objMap,strMapData)OnErrorResumeNextobjMap.MapData=strMapData
IfErr.Number<>0Then ChangeMapSchema=True Else ChangeMapSchema=False EndIfEndFunction
![Page 1645: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1645.jpg)
MarkerProperty
ReturnsaChMarkerobjectthatrepresentsthemarkersforeverypointinthespecifiedseries.Read-only.
expression.Marker
expressionRequired.AnexpressionthatreturnsaChSeriesobject.
![Page 1646: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1646.jpg)
ExampleThisexamplesetsthecharttypeandthensetsthemarkertypeandinteriorcolorforthespecifiedseries.
SubSetMarkerStyle()DimchConstantsDimserSeries1
SetchConstants=ChartSpace1.Constants
SetserSeries1=ChartSpace1.Charts(0).SeriesCollection(0)
ChartSpace1.Charts(0).Type=chConstants.chChartTypeLineMarkers
serSeries1.Marker.Style=chConstants.chMarkerStyleSquare
serSeries1.Interior.Color="blue"EndSub
![Page 1647: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1647.jpg)
ShowAll
![Page 1648: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1648.jpg)
MaxHeightProperty
MaxHeightpropertyasitappliestothePivotTableobject.
MaxHeightpropertyasitappliestotheSpreadsheetobject.
![Page 1649: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1649.jpg)
MaximumProperty
Returnsorsetsthemaximumvalueforthespecifiedscale.Read/writeDouble.
expression.Maximum
expressionRequired.AnexpressionthatreturnsaChScalingobject.
![Page 1650: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1650.jpg)
ExampleThisexamplesetsthemaximumandminimumvaluesforthespecifiedaxisscale.
SubSetScalingLimits()DimchConstantsDimaxisScale
SetchConstants=ChartSpace1.Constants
SetaxisScale=ChartSpace1.Charts(0).Axes(chConstants.chAxisPositionValue).Scaling
axisScale.Maximum=70axisScale.Minimum=-10EndSub0
![Page 1651: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1651.jpg)
MaxRecordsProperty
Returnsorsetsthemaximumnumberofrecordsthattheconnectionwillreturntothelocalcomputer.Read/writeLong.
expression.MaxRecords
expressionRequired.AnexpressionthatreturnsaDataSourceControlobject.
![Page 1652: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1652.jpg)
ShowAll
![Page 1653: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1653.jpg)
MaxWidthProperty
MaxWidthpropertyasitappliestothePivotTableobject.
MaxWidthpropertyasitappliestotheSpreadsheetobject.
![Page 1654: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1654.jpg)
ShowAll
![Page 1655: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1655.jpg)
MemberProperty
MemberpropertyasitappliestothePivotResultColumnAxis,PivotResultGroupAxis,PivotResultPageAxis,andPivotResultRowAxisobjects.
MemberpropertyasitappliestothePivotFieldSetobject.
![Page 1656: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1656.jpg)
MemberCaptionsProperty
ReturnsorsetsanarrayofVariantvaluesthatcontainsthecaptionsofthemembersinthespecifiedfield.Usethispropertytocustomizethecaptionsofthemembersinafield.Read/write.
expression.MemberCaptions
expressionRequired.AnexpressionthatreturnsaPivotFieldobject.
![Page 1657: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1657.jpg)
RemarksThearraythatyoupasstothispropertycontainsanarrayforeachcaptionthatyouwanttomodify.Thefirstelementinthearraycancontaineitheramembername,uniquename,orareferencetoaPivotMemberobject.Thesecondelementinthearrayisthenewcaptiontobeusedforthemember.
Membersnotspecifiedinthearraywillusethedefaultcaptionsprovidedbythedatasource.
NoteThispropertywillworkonlywithOnlineAnalyticalProcessing(OLAP)datasources.
![Page 1658: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1658.jpg)
ExampleThisexamplereplacesthecaptionsintheStateProvincefieldoftheCustomersfieldsetwithcaptionsthataremorereadable.
SubNewMemberCaptions()
DimfldStateCaptionsDimavarNewCaptions(2)
SetfldStateCaptions=PivotTable1.ActiveView.FieldSets("Customers")_.Fields("StateProvince")
'Thefollowingthreelinesofcodespecifythenewcaptionsto'bedisplayedforthestatesintheStateProvincefield.avarNewCaptions(0)=Array("[StateProvince].[CA]","California")avarNewCaptions(1)=Array("[StateProvince].[WA]","Washington")avarNewCaptions(2)=Array("[StateProvince].[OR]","Oregon")
'ApplythenewcaptionstotheStateProvincefield.fldStateCaptions.MemberCaptions=avarNewCaptions
EndSub
![Page 1659: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1659.jpg)
ShowAll
![Page 1660: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1660.jpg)
MemberPropertiesProperty
MemberPropertiespropertyasitappliestothePivotFieldobject.
MemberPropertiespropertyasitappliestothePivotAxisMember,PivotColumnMember,PivotPageMember,andPivotRowMemberobjects.
![Page 1661: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1661.jpg)
ExampleAsitappliestothePivotFieldobject.
![Page 1662: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1662.jpg)
MemberPropertiesOrderProperty
ReturnsorsetsanarrayofVariantvaluesthatrepresentstheorderthatthememberpropertiesaretobedisplayedinthespecifiedfield.Usethispropertytorearrangetheorderthatmemberpropertiesaredisplayedin.Read/write.
expression.MemberPropertiesOrder
expressionRequired.AnexpressionthatreturnsaPivotFieldobject.
![Page 1663: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1663.jpg)
RemarksThearraythatyoupasstothispropertycancontainalistofPivotMemberPropertyobjectsoraStringlistofmembercaptions.
![Page 1664: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1664.jpg)
ExampleThisexampleenablesthemembercaptionsfortheStoreNamefieldinPivotTable1.Then,themembercaptionsarerearranged,andtheircaptionsarecustomized.
SubFormat_MemberProperties()DimptViewDimptConstantsDimfldStoreName
SetptConstants=PivotTable1.Constants
'SetavariabletotheactiveviewofthePivotTable.SetptView=PivotTable1.ActiveView
'SetavariabletotheStoreNamefield.SetfldStoreName=ptView.FieldSets("Store").Fields("StoreName")
'Thefollowingthreelinesofcodespecifythatthememberpropertiesare'displayedinthePivotTablelist.fldStoreName.MemberProperties("StoreManager").DisplayIn=ptConstants.plDisplayPropertyInReportfldStoreName.MemberProperties("StoreType").DisplayIn=ptConstants.plDisplayPropertyInReportfldStoreName.MemberProperties("StoreSqft").DisplayIn=ptConstants.plDisplayPropertyInReport
fldStoreName.MemberPropertiesOrder=Array("StoreType","StoreSqft","StoreManager")
'Thefollowingthreelinesofcodesetthecaptionforthememberproperties.fldStoreName.MemberProperties("StoreManager").Caption="ManagerName"fldStoreName.MemberProperties("StoreType").Caption="StoreType"fldStoreName.MemberProperties("StoreSqft").Caption="SizeinSQFT"EndSub
![Page 1665: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1665.jpg)
![Page 1666: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1666.jpg)
MemberPropertyProperty
ReturnsaPivotMemberPropertyobjectthatrepresentsthememberpropertyofthespecifiedresultmember.
expression.MemberProperty
expressionRequired.AnexpressionthatreturnsaPivotResultMemberPropertyobject.
![Page 1667: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1667.jpg)
MergeAreaProperty
ReturnsaRangeobjectthatrepresentsthemergedrangecontaininganypartofthespecifiedrange.Thespecifiedrangecancontainmorethanonecell;iftherangedoesnotcontainanymergedcells,itisreturnedunchanged.Read-only.
expression.MergeArea
expressionRequired.AnexpressionthatreturnsaRangeobject.
![Page 1668: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1668.jpg)
ExampleThisexamplecreatesamergedcellfromtherangeB2:C5inSheet1andputsathickredborderaroundthemergedcell.
SubMerge_Cells()DimssConstantsDimshtCurrentSetssConstants=Spreadsheet1.ConstantsSetshtCurrent=Spreadsheet1.Worksheets("Sheet1")'MergecellsB2:C5.shtCurrent.Range("B2:C5").Merge'Setthebordercolorofthemergedcell.shtCurrent.Range("B2").MergeArea.Borders.Color="Red"'Settheborderweightofthemergedcell.shtCurrent.Range("B2").MergeArea.Borders.Weight=ssConstants.owcLineWeightThickEndSub
![Page 1669: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1669.jpg)
MergeCellsProperty
Trueifthespecifiedrangeiswithinamergedcell.Falseifthespecifiedrangedoesnotcontainamergedcell.Nullifthespecifiedrangecontainsallorpartofamergedcellandothercellsoutsideofthemergedcell.Read/writeVariant.
expression.MergeCells
expressionRequired.AnexpressionthatreturnsaRangeobject.
![Page 1670: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1670.jpg)
RemarksWhenyouselectarangethatcontainsmergedcells,theresultingselectionmaybedifferentfromtheintendedselection.
UsetheAddresspropertytochecktheaddressoftheselectedrange.
UsetheUnMergemethodtounmergethespecifiedrange.
![Page 1671: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1671.jpg)
MinimumProperty
Returnsorsetstheminimumvalueforthespecifiedscale.Read/writeDouble.
expression.Minimum
expressionRequired.AnexpressionthatreturnsaChScalingobject.
![Page 1672: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1672.jpg)
ExampleThisexamplesetsthemaximumandminimumvaluesforthespecifiedaxisscale.
SubSetScalingLimits()DimchConstantsDimaxisScale
SetchConstants=ChartSpace1.Constants
SetaxisScale=ChartSpace1.Charts(0).Axes(chConstants.chAxisPositionValue).Scaling
axisScale.Maximum=70axisScale.Minimum=-10EndSub
![Page 1673: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1673.jpg)
MinorGridlinesProperty
ReturnsaChGridlinesobjectthatrepresentstheminorgridlinesforthespecifiedaxis.Notethatyoucanusegridlinesonanyaxis.Read-only.
expression.MinorGridlines
expressionRequired.AnexpressionthatreturnsaChAxisobject.
![Page 1674: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1674.jpg)
ExampleThisexamplesetsthecolorandlineweightforthegridlinesonthevalueaxisofthefirstchartinChartSpace1.
SubFormat_Gridlines()DimchConstantsDimglMajorGridlinesDimglMinorGridlines
SetchConstants=ChartSpace1.Constants
'Setavariabletothemajorgridlinesonthevalueaxis.SetglMajorGridlines=ChartSpace1.Charts(0).Axes(_chConstants.chAxisPositionValue).MajorGridlines
'Setavariabletotheminorgridlinesonthevalueaxis.SetglMinorGridlines=ChartSpace1.Charts(0).Axes(_chConstants.chAxisPositionValue).MinorGridlines
'Setthecolorandweightofthemajorgridlines.glMajorGridlines.Line.Color="white"glMajorGridlines.Line.Weight=5
'Setthecolorandweightoftheminorgridlines.glMinorGridlines.Line.Color="yellow"glMajorGridlines.Line.Weight=2EndSub
![Page 1675: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1675.jpg)
ShowAll
![Page 1676: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1676.jpg)
MinorTickMarksProperty
Returnsorsetstheminortick-marktypeforthespecifiedaxis.Read/writeChartTickMarkEnum.
expression.MinorTickMarks
expressionRequired.AnexpressionthatreturnsaChAxisobject.
![Page 1677: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1677.jpg)
ExampleThisexampleturnsonminorgridlinesandminortickmarksforthespecifiedaxisandsetsthegridlinecolorandtick-markstyle.
SubFormatValueAxis()DimchConstantsDimaxValueAxis
SetchConstants=ChartSpace1.Constants
SetaxValueAxis=ChartSpace1.Charts(0).Axes(chConstants.chAxisPositionLeft)
axValueAxis.HasMinorGridlines=True
axValueAxis.MinorGridlines.Line.Color="green"
axValueAxis.MinorTickMarks=chConstants.chTickMarkOutsideEndSub
![Page 1678: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1678.jpg)
MinorUnitProperty
Returnsorsetstheminorunitforthespecifiedaxis.Usethispropertyonlywithavalueaxis.Read/writeDouble.
expression.MinorUnit
expressionRequired.AnexpressionthatreturnsaChAxisobject.
![Page 1679: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1679.jpg)
RemarksSettingthispropertycausestheHasAutoMinorUnitpropertytobesettoFalse.
![Page 1680: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1680.jpg)
ExampleThisexamplesetsthemajorandminorunitforthevalueaxis.
SubSetValueAxis()DimchConstantsDimaxValueAxis
SetchConstants=ChartSpace1.Constants
SetaxValueAxis=ChartSpace1.Charts(0).Axes(chConstants.chAxisPositionValue)
axValueAxis.MajorUnit=7axValueAxis.MinorUnit=2.5EndSub
![Page 1681: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1681.jpg)
MinorVersionProperty
ReturnstheminorversionoftheMicrosoftOfficeWebComponentsobjectlibrary.Read-onlyString.
expression.MinorVersion
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1682: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1682.jpg)
ShowAll
![Page 1683: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1683.jpg)
MiterProperty
ReturnsorsetsaChartLineMiterEnumconstantindicatingthewaythataline'sexterioredgesarejoined.Read/write.
expression.Miter
expressionRequired.AnexpressionthatreturnsaChLineobject.
![Page 1684: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1684.jpg)
ExampleThisexamplechangesthefirstchartinChartspace1toalinechartandthenformatsthelineforthefirstdataseriesinthechart.
SubSet_Series_LineStyle()
DimchConstantsDimserSeries1
SetchConstants=ChartSpace1.Constants
'Changethecharttoalinechart.ChartSpace1.Charts(0).Type=chChartTypeLine
'Setavariabletorefertothefirstdataseriesinthechart.SetserSeries1=ChartSpace1.Charts(0).SeriesCollection(0)
'Setthemiterofthelineofthefirstseries.serSeries1.Line.Miter=chConstants.chLineMiterBevel
'Setthelineweightofthefirstseries.serSeries1.Line.Weight=chConstants.owcLineWeightThick
'Setthelinestyleofthefirstseries.serSeries1.Line.DashStyle=chConstants.chLineRoundDot
EndSub
![Page 1685: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1685.jpg)
MoveAfterReturnProperty
DetermineswhethertheactivecellwillbemovedwhentheuserpressestheENTERkey.ThedefaultvalueisTrue.UsetheMoveAfterReturnDirectionpropertytodeterminewhichdirectiontheactivecellmoveswhentheuserpressesENTER.Read/writeBoolean.
expression.MoveAfterReturn
expressionRequired.AnexpressionthatreturnsaSpreadsheetobject.
![Page 1686: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1686.jpg)
ExampleThisexamplecausestheactivecelltoremainselectedaftertheuserpressestheENTERkey.
Spreadsheet1.MoveAfterReturn=False
![Page 1687: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1687.jpg)
ShowAll
![Page 1688: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1688.jpg)
MoveAfterReturnDirectionProperty
ReturnsorsetsthedirectioninwhichthefocusismovedwhentheuserpressestheENTERkeyandtheMoveAfterReturnpropertyissettoTrue.Read/writeXlDirection.
expression.MoveAfterReturnDirection
expressionRequired.AnexpressionthatreturnsaSpreadsheetobject.
![Page 1689: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1689.jpg)
ExampleThisexamplecausesthecelltotherightoftheactivecelltobeselectedaftertheuserpressestheENTERkey.
SubMoveAfterEnter()DimssConstantsSetssConstants=Spreadsheet1.Constants'EnabletheMoveAfterReturnproperty.Spreadsheet1.MoveAfterReturn=True'Movethecursoronecelltotherightwhen'theuserpressesENTER.Spreadsheet1.MoveAfterReturnDirection=xlToRightEndSub
![Page 1690: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1690.jpg)
NameProperty
Returnsorsetsthenameofthespecifiedobject.
Read/writeVariantfortheFontobject.
Read/writefortheRangeobject.ReturnsaNameobject.SetusingaString.
Read/writeStringfortheChAxis,ChChart,ChFont,ChSeries,GroupingDef,Name,PageField,PivotFont,PivotHyperlink,PivotTotal,RecordsetDef,SchemaField,SchemaRowsource,andWorksheetobjects.
Read-onlyStringforallotherobjectsintheAppliesTolist.
expression.Name
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1691: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1691.jpg)
ExampleThisexamplesetsthenameofthespecifiedchart.
ChartSpace1.Charts(0).Name="LineChart"
Afterthechartnamehasbeenset,youcanrefertothechartbyname,asshowninthefollowingexample.
ChartSpace1.Charts("LineChart").HasLegend=True
![Page 1692: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1692.jpg)
ShowAll
![Page 1693: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1693.jpg)
NamesProperty
NamespropertyasitappliestotheSpreadsheetandWorkbookobjects.
NamespropertyasitappliestotheWorksheetobject.
![Page 1694: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1694.jpg)
ExampleAsitappliestotheSpreadsheetandWorkbookobjects.
![Page 1695: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1695.jpg)
ShowAll
![Page 1696: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1696.jpg)
NextProperty
NextpropertyasitappliestotheRangeobject.
NextpropertyasitappliestotheWorksheetobject.
![Page 1697: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1697.jpg)
ExampleAsitappliestotheRangeobject.
![Page 1698: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1698.jpg)
NextSectionProperty
ReturnsaSectionobjectthatrepresentsthenextphysicalsectiononthespecifiedpage,regardlessofsiblingsorparents.Thispropertyfailsonthefinalsectiononthepage.Read-only.
expression.NextSection
expressionRequired.AnexpressionthatreturnsaSectionobject.
![Page 1699: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1699.jpg)
NextSiblingProperty
ReturnsaSectionobjectthatrepresentsthenextsiblinginthecurrentdataaccesspage.Thismaycausethenextpageofrecordstopopulateitself.Thispropertywillnotcrossparents,anditwillfailonthelastsiblingofthecurrentdataaccesspage.
expression.NextSibling
expressionRequired.AnexpressionthatreturnsaSectionobject.
![Page 1700: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1700.jpg)
NumberFormatProperty
Returnsorsetsthenumberformatforthespecifiedobject.Read/writeVariantfortheRangeobject;read/writeStringforallotherobjectsintheAppliesTolist.
expression.NumberFormat
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1701: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1701.jpg)
RemarksYoucandefineanumberformatbyusingthesameformatcodesasMicrosoftExcel.Forinformationonnumberformatcodes,seethe"Createordeleteacustomnumberformat"topicinMicrosoftExcelHelp.
![Page 1702: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1702.jpg)
ExampleThefollowingexamplesetsthenumberformatfortherangesA1:E10andF1:F10ontheactiveworksheet.
SubFormatCells()
Spreadsheet1.ActiveSheet.Range("A1:E10").NumberFormat="0.###"Spreadsheet1.ActiveSheet.Range("F1:F10").NumberFormat="Currency"
EndSub
![Page 1703: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1703.jpg)
NumericScaleProperty
Returnsthemaximumnumberofdigitsyoucanhavetotherightofthedecimalpointfornumerictypes.Read-onlyLong.
expression.NumericScale
expressionRequired.AnexpressionthatreturnsaSchemaParameterobject.
![Page 1704: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1704.jpg)
ShowAll
![Page 1705: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1705.jpg)
ObjectTypeProperty
ReturnsaChartSelectionsEnumthatrepresentsthetypeofobjectthatiscurrentlyselected.
expression.ObjectType
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1706: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1706.jpg)
OfflineProperty
ReturnsaBooleanindicatingwhetherMicrosoftInternetExplorerisinofflinemode.Read-only.
expression.Offline
expressionRequired.AnexpressionthatreturnsaDataSourceControlobject.
![Page 1707: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1707.jpg)
ExampleThisexamplechangesthetextofalabelcontroltoindicatetheofflinestatusofadataaccesspagebeforethedataaccesspageisboundtoitsdatasource.
SubMSODSC_BeforeInitialBind(DSCEventInfo)
IfMSODSC.Offline=TruethenLabel.innerText="Offline"ElseLabel.innerText="Online"EndIf
EndSub
![Page 1708: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1708.jpg)
OfflinePublicationProperty
ReturnsorsetsaStringthatrepresentsthepublicationtousewhenthedataaccesspageistakenoffline.Read/write.
expression.OfflinePublication
expressionRequired.AnexpressionthatreturnsaDataSourceControlobject.
![Page 1709: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1709.jpg)
RemarksThispropertyisvalidonlywhentheOfflineTypepropertyissettodscOfflineMerge.
![Page 1710: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1710.jpg)
OfflineSourceProperty
ReturnsorsetsaStringthatrepresentsthedatasourceusedwhenthedataaccesspageisoffline.Read/write.
expression.OfflineSource
expressionRequired.AnexpressionthatreturnsaDataSourceControlobject.
![Page 1711: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1711.jpg)
RemarksThevalueusedtosetthispropertyvariesbaseduponthecurrentsettingoftheOfflineTypeandXMLLocationproperties.IftheOfflineTypepropertyissettodscOfflineMerge,thenthispropertyshouldbesettoaconnectionstringforthelocalMSDEdatabase.IftheOfflineTypepropertyissettodscOfflineXMLDataFileandtheXMLLocationpropertyissettodscXMLDataFile,thenthispropertyshouldbesettoastringcontainingthepathtotheXMLdatafile.
![Page 1712: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1712.jpg)
ExampleThisexamplesetstheofflinesettingsfromthedatasourcecontrolnamedMSODSC.
SubSetOfflineSettings()
DimdscConstants
SetdscConstants=MSODSC.Constants
'Settheofflinetype.MSODSC.OfflineType=dscConstants.dscOfflineXMLDataFile
'SetthelocationoftheXMLdatatoadatafile.MSODSC.XMLLocation=dscconstants.dscXMLDataFile
'SettheXMLdatafiletousewhenthepageisoffline.MSODSC.OfflineSource="Q1SalesAnalysis.xml"
EndSub
![Page 1713: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1713.jpg)
ShowAll
![Page 1714: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1714.jpg)
OfflineTypeProperty
ReturnsorsetsaDscOfflineTypeEnumconstantthatrepresentsthetypeofconnectionusedtopersistthedatawhenadataaccesspageistakenoffline.Read/write.
expression.OfflineType
expressionRequired.AnexpressionthatreturnsaDataSourceControlobject.
![Page 1715: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1715.jpg)
ExampleThisexamplesetstheofflinesettingsfromthedatasourcecontrolnamedMSODSC.
SubSetOfflineSettings()
DimdscConstants
SetdscConstants=MSODSC.Constants
'Settheofflinetype.MSODSC.OfflineType=dscConstants.dscOfflineXMLDataFile
'SetthelocationoftheXMLdatatoadatafile.MSODSC.XMLLocation=dscconstants.dscXMLDataFile
'SettheXMLdatafiletousewhenthepageisoffline.MSODSC.OfflineSource="Q1SalesAnalysis.xml"
EndSub
![Page 1716: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1716.jpg)
OffsetProperty
ReturnsaRangeobjectthatrepresentsarangethatisoffsetfromthespecifiedrange.
expression.Offset(RowOffset,ColumnOffset)
expressionRequired.AnexpressionthatreturnsaRangeobject.
RowOffsetOptionalVariant.Thenumberofrows(positive,negative,or0(zero))bywhichtherangeistobeoffset.Positivevaluesareoffsetdownward,andnegativevaluesareoffsetupward.Thedefaultvalueis0.
ColumnOffsetOptionalVariant.Thenumberofcolumns(positive,negative,or0(zero))bywhichtherangeistobeoffset.Positivevaluesareoffsettotheright,andnegativevaluesareoffsettotheleft.Thedefaultvalueis0.
![Page 1717: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1717.jpg)
ExampleThisexamplesetsthefontforthecontentsofthecellthatisonecolumntotherightoftheactivecell.
Spreadsheet1.ActiveCell.Offset(0,1).Font.Bold=True
ThisexampleloopsthroughthecontiguousvaluesincolumnAintheactivesheetofSpreadsheet1anddeletesanyrowsthatcontainodd-numberedvalues.
SubDelete_Odd_Values()
Spreadsheet1.ActiveSheet.Range("A1").Select
'Loopuntilanemptycellisselected.DoUntilIsEmpty(Spreadsheet1.ActiveCell)
'Iftheactivecellcontainsanoddnumber.IfSpreadsheet1.ActiveCell.ValueMod2=1Then'Deletetherow.Spreadsheet1.ActiveCell.EntireRow.DeleteElse'Selectthenextcell.Spreadsheet1.ActiveCell.Offset(1,0).SelectEndIfLoopEndSub
![Page 1718: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1718.jpg)
ShowAll
![Page 1719: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1719.jpg)
OneSideProperty
OneSidepropertyasitappliestothePageRelatedFieldobject.
OneSidepropertyasitappliestothePageRelationshipobject.
OneSidepropertyasitappliestotheSchemaRelatedFieldandSchemaRelationshipobjects.
![Page 1720: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1720.jpg)
OrderProperty
Returnsorsetsthepolynomialorderforthespecifiedtrendline(anintegervaluegreaterthan1).Ifyousetthispropertyforalineartrendline,itbecomesapolynomialtrendline.Read/writeLong.
expression.Order
expressionRequired.AnexpressionthatreturnsaChTrendlineobject.
![Page 1721: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1721.jpg)
ExampleThisexamplesetstheorderforthespecifiedtrendline.
ChartSpace1.Charts(0).SeriesCollection(0).Trendlines(0).Order=2
![Page 1722: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1722.jpg)
OrderedMembersProperty
ReturnsorsetsaVariantthatdetermineshowthemembersofafieldaresortedwhentheSortDirectionpropertyissettoplSortDirectionCustom,plSortDirectionCustomAscending,orplSortDirectionCustomDescending.SetthispropertytoanarrayofmembersthatisorderedinthewaythatyouwantthemtoappearinthePivotTablelist.Whensettingthisproperty,youcanpassanarrayofmembernames,memberuniquenames,ormemberobjectreferences.Whenretrievingthisproperty,thearraywillalwayscontainPivotMemberobjectreferences.Read/write.
expression.OrderedMembers
expressionRequired.AnexpressionthatreturnsaPivotFieldobject.
![Page 1723: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1723.jpg)
RemarksAnymembersinthefieldthatarenotlistedinthisarraywillappearbelowthelastmemberlistedinthearray.
Settingthispropertyreplacesthecurrentlist.Toadditemstoanexistinglist,youmustretrievethelistandaddaddmemberstoit,oruseavariabletoholdthecurrentlist,appendtoit,andresetthisproperty.
Itisallowabletopassmembernamesoruniquenamesthatcurrentlydonotexistinthedataresults.Ifyoupassanameoruniquenamethatcannotberesolvedtoaresultingmember,itwillbeconvertedtoaPivotMemberobjectwithitsIsValidpropertysettoFalse.
Toclearthislist,setthispropertytoEmptyoranarrayofzeroelements.
![Page 1724: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1724.jpg)
ExampleThisexamplecreatesacustomsortorderintheTitlefield.
SubCustomSort()
DimptConstantsDimptViewDimpfTitle
SetptConstants=PivotTable1.Constants
SetptView=PivotTable1.ActiveView
'SetavariabletotheTitlefield.SetpfTitle=ptView.FieldSets("Title").Fields("Title")
'SpecifytheorderingforsomeoftheitemsintheTitlefield.pfTitle.OrderedMembers=Array("SalesRepresentative",_"SalesManager","VicePresident,Sales")
'Setthesortdirection.pfTitle.SortDirection=ptConstants.plSortDirectionCustom
EndSub
![Page 1725: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1725.jpg)
ShowAll
![Page 1726: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1726.jpg)
OrientationProperty
PivotFieldSetobject:ReturnsaPivotFieldSetOrientationEnumconstantthatrepresentsthefieldsetorientation.Afieldsetcanbelocatedonboththesummaryaxisandthecolumn,row,orfilteraxisatthesametime.Read-only.
ChAxisobject:ReturnsorsetsaLongthatrepresentstheorientationofthelabelsonthespecifiedaxis.CanbeaChartLabelOrientationEnumconstant.Read/write.
ChScalingobject:ReturnsorsetsaChartScaleOrientationEnumconstantthatrepresentsthescalingorientation.Changingthevalueofthispropertyflipsthechart.Read/write.
expression.Orientation
expressionRequired.AnexpressionthatreturnsoneoftheobjectintheAppliesTolist.
![Page 1727: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1727.jpg)
ExampleThisexamplesetsthescalingorientationforthespecifiedaxis.
SubSetAxisOrientation()
DimchConstants
SetchConstants=ChartSpace1.Constants
ChartSpace1.Charts(0).Axes(1).Scaling.Orientation=chConstants.chScaleOrientationMaxMin
EndSub
![Page 1728: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1728.jpg)
OverlapProperty
Returnsorsetstheamountofoverlapbetweenmarkerswithinasinglecategory.Positivevaluescausethemarkerstooverlap,andnegativevaluescausethemarkerstoseparate.Thedefaultvalueiszero(0),andthevalidrangeisfrom–100through100.Read/writeLong.
expression.Overlap
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1729: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1729.jpg)
ExampleThisexamplesetstheoverlapvalueforthespecifiedchart.
ChartSpace1.Charts(0).Overlap=25
![Page 1730: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1730.jpg)
PageAxisProperty
PivotViewobject:ReturnsaPivotGroupAxisobjectthatrepresentsthepageaxis.
PivotDataobject:ReturnsaPivotResultGroupAxisobjectthatrepresentsthepageaxis.
expression.PageAxis
expressionRequired.AnexpressionthatreturnsaPivotVieworPivotDataobject.
![Page 1731: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1731.jpg)
PageFieldsProperty
ReturnsthePageFieldscollectionforthespecifiedrecordsetdefinition.
expression.PageFields
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1732: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1732.jpg)
RemarksForinformationaboutreturningasinglememberofacollection,seeReturninganObjectfromaCollection.
![Page 1733: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1733.jpg)
PageMemberProperty
PivotCellobject:ReturnsaPivotPageMemberobjectthatrepresentsthepagememberforthespecifiedcell.
PivotResultPageAxisobject:ReturnsaPivotPageMemberobjectthatrepresentsthepagememberforthespecifiedresultaxis.
expression.PageMember
expressionRequired.AnexpressionthatreturnsaPivotCellorPivotResultPageAxisobject.
![Page 1734: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1734.jpg)
PageRelatedFieldsProperty
ReturnsthePageRelatedFieldscollectionforthespecifiedpagerelationship.Read-only.
Forinformationaboutreturningasinglememberofacollection,seeReturninganObjectfromaCollection.
expression.PageRelatedFields
expressionRequired.AnexpressionthatreturnsaPageRelationshipobject.
![Page 1735: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1735.jpg)
PageRowsourceProperty
ReturnsthePageRowsourceobjectforthespecifiedpagefield.Read-only.
expression.PageRowsource
expressionRequired.AnexpressionthatreturnsaPageFieldobject.
![Page 1736: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1736.jpg)
PageRowsourcesProperty
ReturnsthePageRowsourcescollectionforthespecifiedrecordsetdefinition.
Forinformationaboutreturningasinglememberofacollection,seeReturninganObjectfromaCollection.
expression.PageRowsources
expressionRequired.AnexpressionthatreturnsaRecordsetDefobject.
![Page 1737: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1737.jpg)
PanesProperty
ReturnsthePanescollectionforthespecifiedworksheet.
expression.Panes
expressionRequired.AnexpressionthatreturnsaWindowobject.
![Page 1738: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1738.jpg)
RemarksForinformationaboutreturningasinglememberofacollection,seeReturninganObjectfromaCollection.
![Page 1739: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1739.jpg)
ExampleThisexamplesetsavariableforthevisiblerangeinthespecifiedpaneanddisplaystherange'slocation.
SubSetVisibleRange()
DimrngVisible
SetrngVisible=Spreadsheet1.ActiveSheet.Panes(1).VisibleRange
MsgBox"rngVisible.Address"&vr.Address
EndSub
![Page 1740: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1740.jpg)
ParameterValuesProperty
ReturnstheParameterValuescollectionforthespecifiedrecordsetdefinition.
expression.ParameterValues
expressionRequired.AnexpressionthatreturnsaRecordsetDefobject.
![Page 1741: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1741.jpg)
RemarksForinformationaboutreturningasinglememberofacollection,seeReturninganObjectfromaCollection.
![Page 1742: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1742.jpg)
ParentProperty
Returnstheparentobjectforthespecifiedobject.
expression.Parent
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1743: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1743.jpg)
ExampleTheeventprocedureinthisexamplerunswhenevertheuserclicksinthechartworkspace.
SubChartSpace1_Click()
DimchConstantsDimiSeriesNumDimiPointNum
SetchConstants=ChartSpace1.Constants
IfChartSpace1.SelectionType=chConstants.chSelectionPointThen'Pointparentisseries.iSeriesNum=ChartSpace1.Selection.Parent.Index
iPointNum=ChartSpace1.Selection.Index
MsgBox"Series:"&iSeriesNum&"Point:"&iPointNumEndIf
EndSub
![Page 1744: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1744.jpg)
ParentAxisMemberProperty
ReturnsaPivotAxisMemberobjectthatrepresentstheparentmemberforthespecifiedaxismember.
expression.ParentAxisMember
expressionRequired.AnexpressionthatreturnsaPivotAxisMemberobject.
![Page 1745: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1745.jpg)
RemarksThispropertyreturnsNothingifthispropertyisusedforthetoplevelaxismember.
![Page 1746: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1746.jpg)
ParentColumnMemberProperty
ReturnsaPivotColumnMemberobjectthatrepresentstheparentmemberforthespecifiedcolumnmember.
expression.ParentColumnMember
expressionRequired.AnexpressionthatreturnsaPivotColumnMemberobject.
![Page 1747: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1747.jpg)
RemarksThispropertyreturnsNothingifthispropertyisusedforthetoplevelcolumnmember.
![Page 1748: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1748.jpg)
ParentLabelProperty
ReturnsaChCategoryLabelobjectthatrepresentstheparentlabelforthespecifiedlabel.
expression.ParentLabel
expressionRequired.AnexpressionthatreturnsaChCategoryLabelobject.
![Page 1749: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1749.jpg)
RemarksUsingthispropertywithalabelthatdoesnothaveaparentlabelwillresultinarun-timeerror.
![Page 1750: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1750.jpg)
ParentMemberProperty
ReturnsaPivotMemberobjectthatrepresentstheparentmemberforthespecifiedmember.
expression.ParentMember
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1751: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1751.jpg)
ParentPageMemberProperty
ReturnsaPivotPageMemberobjectthatrepresentstheparentmemberforthespecifiedpagemember.
expression.ParentPageMember
expressionRequired.AnexpressionthatreturnsaPivotPageMemberobject.
![Page 1752: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1752.jpg)
ParentRecordsetDefProperty
ReturnsaRecordsetDefobjectthatrepresentstheparentforthespecifiedrecordsetdefinition.
expression.ParentRecordsetDef
expressionRequired.AnexpressionthatreturnsaRecordsetDefobject.
![Page 1753: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1753.jpg)
ParentRowMemberProperty
ReturnsaPivotRowMemberobjectthatrepresentstheparentmemberforthespecifiedrowmember.
expression.ParentRowMember
expressionRequired.AnexpressionthatreturnsaPivotRowMemberobject.
![Page 1754: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1754.jpg)
RemarksThispropertyreturnsNothingifthispropertyisusedforthetoplevelrowmember.
![Page 1755: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1755.jpg)
ParentSectionProperty
ReturnsaSectionobjectthatrepresentstheparentofthespecifiedsection.
expression.ParentSection
expressionRequired.AnexpressionthatreturnsaSectionobject.
![Page 1756: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1756.jpg)
ShowAll
![Page 1757: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1757.jpg)
PathProperty
ReturnsaStringthatrepresentsthepathtothespecifiedmember.Read-only.
expression.Path(Format)
expressionRequired.AnexpressionthatreturnsaPivotMemberobject.
FormatRequiredPivotMemberFindFormatEnum.
![Page 1758: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1758.jpg)
ShowAll
![Page 1759: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1759.jpg)
PatternProperty
ReturnsaChartPatternTypeEnumconstantindicatingthefillpatternforthespecifiedChInteriorobject.Read-only.
expression.Pattern
expressionRequired.AnexpressionthatreturnsaChInteriorobject.
![Page 1760: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1760.jpg)
RemarksUsetheSetPatternedmethodtosetthepatternforaChInteriorobject.
![Page 1761: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1761.jpg)
PercentCompleteProperty
ReturnsaLongvaluethatrepresentsthecompletedportionofthecurrentoperation.ThispropertyissupportedonlyintheRecordsetSaveProgressevent.Read-only.
expression.PercentComplete
expressionRequired.AnexpressionthatreturnsaDSCEventInfoobject.
![Page 1762: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1762.jpg)
RemarksUsethispropertywiththeRecordsetSaveProgresseventtoupdateacontrolinthecontainer,suchasthestatusbar.
Usingthispropertywithanunsupportedeventwillresultinarun-timeerror.
![Page 1763: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1763.jpg)
ExampleThisexampleusestheRecordsetSaveProgesseventtoupdatetheMicrosoftInternetExplorer'sstatusbarwhentherecordsetcontainedbytheDataSourceControlobjectissaved.
SubMSODSC_RecordsetSaveProgress(DSCEventInfo)
'Updatethestatusbarwiththecurrent'completionpercentage.Window.Status=DSCEventInfo.PercentComplete
'Checktoseeifthesavehasbeencompleted.IfDSCEventInfo.PercentComplete=100then
'Clearthestatusbarwhenthesaveiscomplete.Window.Status=""EndIf
EndSub
![Page 1764: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1764.jpg)
PeriodProperty
ReturnsorsetsaLongthatrepresentstheperiodforamoving-averagetrendline.Read/write.
expression.Period
expressionRequired.AnexpressionthatreturnsaChTrendlineobject.
![Page 1765: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1765.jpg)
PerspectiveProperty
ReturnsorsetsaLongindicatingtheamountofperspectiveonathree-dimensionalchart.ThispropertyhasnoeffectiftheProjectionModepropertyofthecharthasbeensettochProjectionModeOrthographic.Validvaluesrangefrom0to80.Read/write.
expression.Perspective
expressionRequired.AnexpressionthatreturnsaChChartobject
![Page 1766: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1766.jpg)
ExampleThisexampleconvertsthefirstchartinChartspace1toa3-DColumnchartandthensetstheperspectiveforthechart.
SubSetPerspective()
Dimcht3DColumn
'SetavariabletothefirstchartinChartspace1.Setcht3DColumn=ChartSpace1.Charts(0)
'Changethecharttoa3-DColumnchart.cht3DColumn.Type=chChartTypeColumnClustered3D
'Settheperspective.cht3DColumn.Perspective=35
EndSub
![Page 1767: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1767.jpg)
PivotAxisProperty
ReturnsthePivotResultGroupAxisobjectforthespecifiedcategorylabelordataseries.
expression.PivotAxis
expressionRequired.AnexpressionthatreturnsaChCategoryLabelsorChSeriesCollectionobject.
![Page 1768: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1768.jpg)
ShowAll
![Page 1769: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1769.jpg)
PivotObjectProperty
PivotObjectpropertyasitappliestotheChPointobject.
PivotObjectpropertyasitappliestotheChCategoryLabel,ChChartField,ChLegendEntry,andChSeriesobjects.
![Page 1770: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1770.jpg)
RemarksThispropertyreturnsNullifthechartisnotboundtoarelationaldatasource.
![Page 1771: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1771.jpg)
ShowAll
![Page 1772: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1772.jpg)
PlotAllAggregatesProperty
ReturnsorsetsaChartPlotAggregatesEnumconstantthatdetermineswhichfieldsareplottedwhenthechartcontrolisboundtoarelationaldatasource.Read/write.
expression.PlotAllAggregates
expressionRequired.AnexpressionthatreturnsaChartSpaceobject.
![Page 1773: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1773.jpg)
RemarksThispropertyisrelevantonlywhenmultiplefieldshavebeenaddedtothedataareaofthechart.
![Page 1774: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1774.jpg)
PlotAreaProperty
ReturnsaChPlotAreaobjectthatrepresentstheplotareaonthespecifiedchart.Notethatpie,doughnut,radar,andpolarchartsdonothaveplotareas.
expression.PlotArea
expressionRequired.AnexpressionthatreturnsaChChartobject.
![Page 1775: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1775.jpg)
ExampleThisexamplesetstheinteriorcolorfortheplotareaonthespecifiedchart.
ChartSpace1.Charts(0).PlotArea.Interior.Color="Green"
![Page 1776: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1776.jpg)
PointsProperty
ReturnstheChPointscollectionforthespecifiedseries.
expression.Points
expressionRequired.AnexpressionthatreturnsaChSeriesobject.
![Page 1777: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1777.jpg)
RemarksForinformationaboutreturningasinglememberofacollection,seeReturninganObjectfromaCollection.
![Page 1778: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1778.jpg)
ExampleThisexamplesetstheinteriorcolorforpointtwointhespecifiedseries.
ChartSpace1.Charts(0).SeriesCollection(0).Points(2).Interior.Color="green"
![Page 1779: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1779.jpg)
ShowAll
![Page 1780: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1780.jpg)
PositionProperty
Returnsorsetsthepositionoftheobject.
Read/writeChartAxisPositionEnumfortheChAxisobject.
Read/writeChartDataLabelPositionEnumfortheChDataLabelsobject.
Read/writeChartLegendPositionEnumfortheChLegendobject.
Read/writeChartTitlePositionEnumfortheChTitleobject.
expression.Position
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1781: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1781.jpg)
ExampleThisexampleputsthelegendforthespecifiedcharttotheleftoftheplotarea.
SubAddLegend()
DimchConstants
SetchConstants=ChartSpace1.Constants
'EnbablethelegendforthefirstchartinChartspace1.ChartSpace1.Charts(0).HasLegend=True
'Setthepositionofthelegend.ChartSpace1.Charts(0).Legend.Position=chConstants.chLegendPositionLeft
EndSub
![Page 1782: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1782.jpg)
PrecisionProperty
Returnsthemaximumnumberofdigitsyoucanusefornumerictypes.Read-onlyLong.
expression.Precision
expressionRequired.AnexpressionthatreturnsaSchemaParameterobject.
![Page 1783: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1783.jpg)
PrefixCharacterProperty
Returnstheprefixcharacterforthespecifiedrange.Returnsanapostrophe(')ifthespecifiedrangecontainsavaluethatwasprecededwithanapostrophewhenitwasenteredintotheworksheet.Returnsablankstringifthespecifiedrangedoesnotcontainaprefixcharacter.Read-onlyVariant.
expression.PrefixCharacter
expressionRequired.AnexpressionthatreturnsaRangeobject.
![Page 1784: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1784.jpg)
ExampleThisexampledeletesallprefixcharactersfromtheactiveworksheetinSpreadsheet1.
SubDelete_PrefixCharacters()DimrngCell
'Loopthroughallusedcellsintheactiveworksheet.ForEachrngCellInSpreadsheet1.ActiveSheet.UsedRange
'Ifaprefixcharacterexists,deleteit.IfrngCell.PrefixCharacter<>""ThenrngCell.Value=rngCell.ValueEndIfNextEndSub
![Page 1785: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1785.jpg)
ShowAll
![Page 1786: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1786.jpg)
PresetGradientTypeProperty
ReturnsaChartPresetGradientTypeEnumconstantindicatingthepresetgradienttypeforthespecifiedChInteriorobject.Read-only.
expression.PresetGradientType
expressionRequired.AnexpressionthatreturnsaChInteriorobject.
![Page 1787: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1787.jpg)
RemarksUsetheSetPresetGradientmethodtosetthepresetgradienttypeforthefill.
![Page 1788: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1788.jpg)
ShowAll
![Page 1789: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1789.jpg)
PresetTextureProperty
ReturnsaChartPresetTextureEnumconstantindicatingthepresettextureforthespecifiedChInteriorobject.Read-only.
expression.PresetTexture
expressionRequired.AnexpressionthatreturnsaChInteriorobject.
![Page 1790: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1790.jpg)
RemarksUsetheSetTexturedmethodtosetthepresettextureforaChInteriorobject.
![Page 1791: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1791.jpg)
ShowAll
![Page 1792: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1792.jpg)
PreviousProperty
PreviouspropertyasitappliestotheRangeobject.
PreviouspropertyasitappliestotheWorksheetobject.
![Page 1793: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1793.jpg)
ExampleAsitappliestotheRangeobject.
![Page 1794: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1794.jpg)
PreviousSectionProperty
ReturnsaSectionobjectthatrepresentstheprevioussectiononthespecifiedpage,regardlessofsiblingsorparents.Thispropertyfailsonthefirstsectionofthepage.
expression.PreviousSection
expressionRequired.AnexpressionthatreturnsaSectionobject.
![Page 1795: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1795.jpg)
PreviousSiblingProperty
ReturnsaSectionobjectthatrepresentstheprevioussiblinginthecurrentdataaccesspage.Thispropertyfailsonthefirstsiblingofthecurrentdataaccesspage.
expression.PreviousSibling
expressionRequired.AnexpressionthatreturnsaSectionobject.
![Page 1796: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1796.jpg)
PrimaryPageRowsourceProperty
ReturnsaPageRowsourceobjectthatrepresentstheprimarypagerowsourceforthespecifiedrecordsetdefinition.Whenarecordsetdefinitioniscreated,therowsourcenamedintheAddorAddNewmethodbecomestheprimarypagerowsource.
expression.PrimaryPageRowsource
expressionRequired.AnexpressionthatreturnsaRecordsetDefobject.
![Page 1797: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1797.jpg)
PrintQuality3DProperty
ReturnsorsetsaDoubleindicatingtheratiooftheprintedresolutionofathree-dimensional(3-D)charttotheresolutionofyourprinter.Validvaluesrangefrom0to1.Thedefaultvalueis0.25.Read/write.
expression.PrintQuality3D
expressionRequired.AnexpressionthatreturnsaChartSpaceobject.
![Page 1798: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1798.jpg)
RemarksThelowerthevalueofthisproperty,thefasteryour3-Dchartwillprint.However,settingthisvalueofthispropertytoolowmayyieldunsatisfactoryresults.
![Page 1799: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1799.jpg)
ExampleThisexamplesetsthe3-DchartsinChartspace1toprintat75%oftheprinter'sresolution.
Chartspace1.PrintQuality3D=0.75
![Page 1800: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1800.jpg)
ShowAll
![Page 1801: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1801.jpg)
ProjectionModeProperty
ReturnsorsetsaChartProjectionModeEnumconstantindicatingtheviewingperspectiveofathree-dimensionalchart.Read/write.
expression.ProjectionMode
expressionRequired.AnexpressionthatreturnsaChChartobject.
![Page 1802: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1802.jpg)
ExampleThisexampleconvertsthefirstchartinChartspace1toa3-DColumnchartandthensetstheprojectionmodeofthechart.
SubSetExtrudeAngle()
Dimcht3DColumnDimchConstants
SetchConstants=Chartspace1.Constants
'SetavariabletothefirstchartinChartspace1.Setcht3DColumn=ChartSpace1.Charts(0)
'Changethecharttoa3DColumnchart.cht3DColumn.Type=chChartTypeColumnClustered3D
'Setstheprojectionmodetoorthographic.cht3DColumn.ProjectionMode=chConstants.chProjectionModeOrthographic
'Setstheextrusionangle.cht3DColumn.ExtrudeAngle=75
EndSub
![Page 1803: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1803.jpg)
PropertyCaptionFontProperty
ReturnsaPivotFontobjectthatrepresentsthefontsettingsusedtodisplaythecaptionofOLAPmemberpropertiesinthespecifiedview.Usethereturnedobjecttoformatthefontusedformemberpropertycaptions.
expression.PropertyCaptionFont
expressionRequired.AnexpressionthatreturnsaPivotViewobject.
![Page 1804: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1804.jpg)
ExampleThisexampleformatsthealignmentandthefontofmemberpropertycaptionsandvaluesintheactiveviewofPivotTable1.
SubFormat_MemberProperties()
DimptViewDimptConstants
SetptConstants=PivotTable1.Constants
'SetavariabletothecurrentPivotTableview.SetptView=PivotTable1.ActiveView
'Thefollowingthreelinesofcodeformatthe'fontformemberpropertycaptions.ptView.PropertyCaptionFont.Name="Tahoma"ptView.PropertyCaptionFont.Size=8ptview.PropertyCaptionFont.Bold=True
'Left-alignthememberpropertycaptions.ptview.PropertyCaptionHAlignment=ptConstants.plHAlignLeft
'Thefollowingtwolinesofcodeformatthe'fontformemberpropertyvalues.ptview.PropertyValueFont.Name="Tahoma"ptview.PropertyValueFont.Size=8
'Right-alignthememberpropertyvalues.ptview.PropertyValueHAlignment=ptConstants.plHAlignRight
![Page 1805: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1805.jpg)
EndSub
![Page 1806: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1806.jpg)
ShowAll
![Page 1807: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1807.jpg)
PropertyCaptionHAlignmentProperty
ReturnsorsetsaPivotHAlignmentEnumconstantthatrepresentsthehorizontalalignmentofOLAPmemberpropertycaptionsinthespecifiedview.Usethispropertytosetthehorizontalalignmentofmemberpropertycaptions.Read/write.
expression.PropertyCaptionHAlignment
expressionRequired.AnexpressionthatreturnsaPivotViewobject.
![Page 1808: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1808.jpg)
ExampleThisexampleformatsthealignmentandthefontofmemberpropertycaptionsandvaluesintheactiveviewofPivotTable1.
SubFormat_MemberProperties()
DimptViewDimptConstants
SetptConstants=PivotTable1.Constants
'SetavariabletothecurrentPivotTableview.SetptView=PivotTable1.ActiveView
'Thefollowingthreelinesofcodeformatthe'fontformemberpropertycaptions.ptView.PropertyCaptionFont.Name="Tahoma"ptView.PropertyCaptionFont.Size=8ptview.PropertyCaptionFont.Bold=True
'Left-alignthememberpropertycaptions.ptview.PropertyCaptionHAlignment=ptConstants.plHAlignLeft
'Thefollowingtwolinesofcodeformatthe'fontformemberpropertyvalues.ptview.PropertyValueFont.Name="Tahoma"ptview.PropertyValueFont.Size=8
'Right-alignthememberpropertyvalues.ptview.PropertyValueHAlignment=ptConstants.plHAlignRight
![Page 1809: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1809.jpg)
EndSub
![Page 1810: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1810.jpg)
PropertyCaptionWidthProperty
ReturnsorsetsaLongthatrepresentsthewidthofthecaptionofamemberpropertythatisdisplayedinthespecifiedfield.Read/write.
expression.PropertyCaptionWidth
expressionRequired.AnexpressionthatreturnsaPivotFieldobject.
![Page 1811: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1811.jpg)
PropertyHeightProperty
ReturnsorsetsaLongthatrepresentstheheightofamemberpropertythatisdisplayedinthespecifiedfield.Read/write.
expression.PropertyHeight
expressionRequired.AnexpressionthatreturnsaPivotFieldobject.
![Page 1812: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1812.jpg)
PropertyValueFontProperty
ReturnsaPivotFontobjectthatrepresentsthefontsettingsusedtodisplaythevalueofOLAPmemberpropertiesinthespecifiedview.Usethereturnedobjecttoformatthefontusedformemberpropertyvalues.
expression.PropertyValueFont
expressionRequired.AnexpressionthatreturnsaPivotViewobject.
![Page 1813: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1813.jpg)
ExampleThisexampleformatsthealignmentandthefontofmemberpropertycaptionsandvaluesintheactiveviewofPivotTable1.
SubFormat_MemberProperties()
DimptViewDimptConstants
SetptConstants=PivotTable1.Constants
'SetavariabletothecurrentPivotTableview.SetptView=PivotTable1.ActiveView
'Thefollowingthreelinesofcodeformatthe'fontformemberpropertycaptions.ptView.PropertyCaptionFont.Name="Tahoma"ptView.PropertyCaptionFont.Size=8ptview.PropertyCaptionFont.Bold=True
'Left-alignthememberpropertycaptions.ptview.PropertyCaptionHAlignment=ptConstants.plHAlignLeft
'Thefollowingtwolinesofcodeformatthe'fontformemberpropertyvalues.ptview.PropertyValueFont.Name="Tahoma"ptview.PropertyValueFont.Size=8
'Right-alignthememberpropertyvalues.ptview.PropertyValueHAlignment=ptConstants.plHAlignRight
![Page 1814: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1814.jpg)
EndSub
![Page 1815: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1815.jpg)
ShowAll
![Page 1816: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1816.jpg)
PropertyValueHAlignmentProperty
ReturnsorsetsaPivotHAlignmentEnumconstantthatrepresentsthehorizontalalignmentofOLAPmemberpropertyvaluesinthespecifiedview.Usethispropertytosetthehorizontalalignmentofmemberpropertyvalues.Read/write.
expression.PropertyValueHAlignment
expressionRequired.AnexpressionthatreturnsaPivotViewobject.
![Page 1817: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1817.jpg)
ExampleThisexampleformatsthealignmentandthefontofmemberpropertycaptionsandvaluesintheactiveviewofPivotTable1.
SubFormat_MemberProperties()
DimptViewDimptConstants
SetptConstants=PivotTable1.Constants
'SetavariabletothecurrentPivotTableview.SetptView=PivotTable1.ActiveView
'Thefollowingthreelinesofcodeformatthe'fontformemberpropertycaptions.ptView.PropertyCaptionFont.Name="Tahoma"ptView.PropertyCaptionFont.Size=8ptview.PropertyCaptionFont.Bold=True
'Left-alignthememberpropertycaptions.ptview.PropertyCaptionHAlignment=ptConstants.plHAlignLeft
'Thefollowingtwolinesofcodeformatthe'fontformemberpropertyvalues.ptview.PropertyValueFont.Name="Tahoma"ptview.PropertyValueFont.Size=8
'Right-alignthememberpropertyvalues.ptview.PropertyValueHAlignment=ptConstants.plHAlignRight
![Page 1818: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1818.jpg)
EndSub
![Page 1819: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1819.jpg)
PropertyValueWidthProperty
ReturnsorsetsaLongthatrepresentsthewidthofthevalueofamemberpropertythatisdisplayedinthespecifiedfield.Read/write.
expression.PropertyValueWidth
expressionRequired.AnexpressionthatreturnsaPivotFieldobject.
![Page 1820: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1820.jpg)
PropNamesProperty
ReturnsastringarraycontainingthevaluesoftheIDattributeforeachFieldelementintheschemamapfortheXMLlist(/Map/Entry/Field@ID)inleft-to-rightorder,whichcorrespondstotheorderingof/Field/Rangeelementsinthemap.Read-onlyVariant.
expression.PropNames
expressionRequired.AnexpressionthatreturnsaListObjectobject.
![Page 1821: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1821.jpg)
Remarks
ForXMLlistscreatedbysavingafilefromMicrosoftOfficeExcel2003asanXMLSpreadsheetfile,theIDvaluesreturnedbythePropNamepropertycorrespondtothecolumnnamesintheheaderrowoftheXMLlistrepresentedbytheListObjectobject.TheorderingofthevaluesreturnedinthearraydependsonthesettingoftheRightToLeftproperty.
![Page 1822: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1822.jpg)
ExampleThefollowingexampleshowshowtogetthecolumnnamesinalistwhentheactivecelliswithinthelist:
DimstrFieldNameDimobjListObject
SetobjListObject=Spreadsheet1.ActiveCell.ListObjectForEachstrFieldNameinobjListObject.PropNames'strFieldNamenowcontainselement(field)nameforacolumninthelist.Next
![Page 1823: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1823.jpg)
ProtectContentsProperty
Trueifthecontentsofthesheetareprotected.Read-onlyBoolean.
expression.ProtectContents
expressionRequired.AnexpressionthatreturnsaWorksheetobject.
![Page 1824: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1824.jpg)
ProtectionProperty
ReturnsaProtectionobjectthatcontainstheprotectionpropertiesforthespecifiedworksheet.TheprotectionpropertiesareignorediftheEnabledpropertyissettoFalse.
expression.Protection
expressionRequired.AnexpressionthatreturnsaWorksheetobject.
![Page 1825: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1825.jpg)
ExampleThisexamplelocksthecellsincolumnBandenablesprotectionforthesheet.
SubProtectColumnB()
'Unlockallofthecellsintheactivesheet.Spreadsheet1.ActiveSheet.Cells.Locked=False
'LockthecellsincolumnB.Spreadsheet1.Columns(2).Locked=True
'Protectthelockedcells.Spreadsheet1.ActiveSheet.Protection.Enabled=True
EndSub
![Page 1826: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1826.jpg)
ProtectionModeProperty
Trueifuser-interface-onlyprotectionisenabled.AlwaysreturnsTrue.Read-onlyBoolean.
expression.ProtectionMode
expressionRequired.AnexpressionthatreturnsaWorksheetobject.
![Page 1827: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1827.jpg)
ProtectStructureProperty
Trueiftheorderofthesheetsintheworkbookisprotected.Read-onlyBoolean.
expression.ProtectStructure
expressionRequired.AnexpressionthatreturnsaWorkbookobject.
![Page 1828: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1828.jpg)
ProviderFormattedValueProperty
ReturnsaVariantthatrepresentsthevalueofthespecifiedaggregateasitisformattedbythedatasource.Read-only.
expression.ProviderFormattedValue
expressionRequired.AnexpressionthatreturnsaPivotAggregateobject.
![Page 1829: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1829.jpg)
ProviderTypeProperty
ReturnsaProviderTypeconstantthatrepresentsthetypeofdataproviderforthespecifiedPivotTablelist.Read-only.
expression.ProviderType
expressionRequired.AnexpressionthatreturnsaPivotTableobject.
![Page 1830: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1830.jpg)
ShowAll
![Page 1831: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1831.jpg)
RangeProperty
AsitappliestotheAutoFilterobject.
AsitappliestothePivotDataobject.
AsitappliestotheRange,Spreadsheet,andWorksheetobjects.
![Page 1832: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1832.jpg)
AsitappliestotheListObjectobject.
![Page 1833: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1833.jpg)
AsitappliestotheListRowobject.
![Page 1834: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1834.jpg)
ExampleAsitappliestotheRange,Spreadsheet,andWorksheetobjects.
![Page 1835: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1835.jpg)
RangeSelectionProperty
ReturnsaRangeobjectthatrepresentstheselectedcellsontheworksheetinthespecifiedwindow.Read-only.
expression.RangeSelection
expressionRequired.AnexpressionthatreturnsaWindowobject.
![Page 1836: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1836.jpg)
RemarksThispropertyinidenticalinfunctionalitytotheSelectionproperty.
![Page 1837: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1837.jpg)
ExampleThisexamplesetssetsthefontoftheselectedcellstobold.
Spreadsheet1.ActiveWindow.RangeSelection.Font.Bold=True
![Page 1838: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1838.jpg)
ShowAll
![Page 1839: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1839.jpg)
ReadingOrderProperty
ReturnsorsetsaLongrepresentingthereadingorderforthespecifiedobject.CanbeaXlReadingOrderconstant.Read/write.
expression.ReadingOrder
expressionRequired.AnexpressionthatreturnsaRangeobject.
![Page 1840: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1840.jpg)
RemarksSomeoftheseconstantsmaynotbeavailabletoyou,dependingonthelanguagesupport(U.S.English,forexample)thatyou'veselectedorinstalled.
![Page 1841: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1841.jpg)
RecordNavigationSectionProperty
Trueifthereisanavigationsectionforanygivenbandingsection.ThedefaultvalueisTrue.Read/writeBoolean.
expression.RecordNavigationSection
expressionRequired.AnexpressionthatreturnsaGroupLevelobject.
![Page 1842: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1842.jpg)
RecordSelectorProperty
ReturnsorsetsaBooleanthatindicateswhetherornottodisplaytherecordselectorforthespecifiedgroup.Read/write.
expression.RecordSelector
expressionRequired.AnexpressionthatreturnsaGroupLevelobject.
![Page 1843: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1843.jpg)
RecordsetProperty
PivotCellobject:ReturnsanADORecordsetobjectthatcontainsthedetailrecordsforthecelliftheyareavailable.
PivotDataobject:ReturnsanADORecordsetobjectthatcontainsthedetailrecordsforthespecifiedPivotDataobjectiftheyareavailable.
DataPageobject:ReturnsanADORecordsetobjectforthespecifieddataaccesspage.
expression.Recordset
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1844: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1844.jpg)
RecordsetDefProperty
ReturnsthecontainingRecordsetDefobjectforthespecifiedpagefieldorpagerowsource.
expression.RecordsetDef
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1845: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1845.jpg)
RecordsetDefsProperty
ReturnstheRecordsetDefscollectionforthedatasourcecontrol.
expression.RecordsetDefs
expressionRequired.AnexpressionthatreturnsaDataSourceControlobject.
![Page 1846: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1846.jpg)
RemarksForinformationaboutreturningasinglememberofacollection,seeReturninganObjectfromaCollection.
![Page 1847: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1847.jpg)
RecordsetLabelProperty
Returnsorsetstherecordsetlabelfortherecordnavigationcontrolwhenthepageisnotbandedandonerecordisdisplayed,andwhenthepageisbandedandtwoormorerecordsaredisplayed.Read/writeString.
expression.RecordsetLabel
expressionRequired.AnexpressionthatreturnsaRecordNavigationControlobject.
![Page 1848: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1848.jpg)
RemarksThelabelconsistsoftwostringsseparatedbyasemicolon.Thefirststringrepresentsthelabelthatisdisplayedwhenonerecordisdisplayedonthepage,andthesecondstringrepresentsthelabelthatisdisplayedwhentwoormorerecordsaredisplayedonthepage.Thelabelcancontainthefollowingplaceholdersfordisplayingrecordsetinformationonthepage.
Placeholder Description|0 Thenumberofthecurrentrecord,orthenumberofthefirst
visiblerecordinthegroup.|1 Thenumberofthelastvisiblerecordinthegroup.|2 Thenumberofrecordsintherecordset.
![Page 1849: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1849.jpg)
ExampleThisexamplesetstherecordsetlabel.Ifthepageisbandedandrecords1through5outof8aredisplayed,thelabelsays"Categories1-5of8."Ifthepageisnotbandedandthefirstrecordisdisplayed,thelabelsays"Category1of8."
ProductNavigation.RecordsetLabel=_"Category|1of|2;Categories|0-|1of|2"
![Page 1850: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1850.jpg)
ShowAll
![Page 1851: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1851.jpg)
RecordsetTypeProperty
Returnsorsetstherecordsettypeforthedatasourcecontrol.Read/writeDscRecordsetTypeEnum.
expression.RecordsetType
expressionRequired.AnexpressionthatreturnsaDataSourceControlobject.
![Page 1852: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1852.jpg)
RecordSourceProperty
ElementExtensionandGroupLevelobjects:ReturnsorsetsaStringthatrepresentstherecordsource(thenameofarecordsetdefinitionorgroupingdefinition)forthesection.AppliesonlytoDIVsections.Read/write.
RecordNavigationControlobject:ReturnsorsetsaDataMemberobjectthatrepresentstherecordsourceforthesection.Read/write.
expression.RecordSource
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1853: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1853.jpg)
RefersToProperty
Returnsorsetstheformulathatthenameasdefinedrefersto,inthelanguageofthescriptandinA1-stylenotation,beginningwithanequalsign.Read/writeVariant.
expression.RefersTo
expressionRequired.AnexpressionthatreturnsaNameobject.
![Page 1854: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1854.jpg)
ExampleThefollowingexamplecreatesalistofallthenamesintheactiveworkbook,alongwiththeformulastowhichtheyrefer.
SubList_All_Names()DimnmCurrentNameDimrngCurrent
SetrngCurrent=Spreadsheet1.ActiveSheet.Range("A1")
'Loopthroughallofthenamesintheactiveworkbook.ForEachnmCurrentNameInSpreadsheet1.ActiveWorkbook.Names
'Writethecurrentnametotheworksheet.rngCurrent.Value=nmCurrentName.Name
'Writethedefinitionofthecurrentnametotheworksheet.rngCurrent.Offset(0,1).Value="'"&nmCurrentName.RefersTo
SetrngCurrent=rngCurrent.Offset(1,0)NextEndSub
![Page 1855: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1855.jpg)
RefersToLocalProperty
ReturnsorsetsaVariantrepresentingtheformulathatthenamerefersto.Theformulaisinthelanguageoftheuser,andit'sinA1-stylenotation,beginningwithanequalssign.Read/write.
expression.RefersToLocal
expressionRequired.AnexpressionthatreturnsaNameobject.
![Page 1856: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1856.jpg)
ExampleThefollowingexamplecreatesalistofallthenamesintheactiveworkbook,alongwiththeformulastowhichtheyrefer,inthelanguageoftheuser.
SubList_All_Names()DimnmCurrentNameDimrngCurrent
SetrngCurrent=Spreadsheet1.ActiveSheet.Range("A1")
'Loopthroughallofthenamesintheactiveworkbook.ForEachnmCurrentNameInSpreadsheet1.ActiveWorkbook.Names
'Writethecurrentnametotheworksheet.rngCurrent.Value=nmCurrentName.Name
'Writethedefinitionofthecurrentnametotheworksheet.rngCurrent.Offset(0,1).Value="'"&nmCurrentName.RefersToLocal
SetrngCurrent=rngCurrent.Offset(1,0)NextEndSub
![Page 1857: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1857.jpg)
RefersToRangeProperty
ReturnstheRangeobjectreferredtobyaNameobject.IftheNameobjectdoesn'trefertoarange(forexample,ifitreferstoaconstantoraformula),thispropertygeneratesarun-timeerror.Read-only.
expression.RefersToRange
expressionRequired.AnexpressionthatreturnsaNameobject.
![Page 1858: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1858.jpg)
ResyncCommandProperty
SpecifiesanSQLcommandparameterizedbythekeyfieldvaluesfromthespecifiedrecordset’suniquetablesuchthatthecommandreturnsexactlyonerecord.Theresynccommandisexecutedto"fixup"arowafteranupdateorinsertionismade.Read/writeString.
expression.ResyncCommand
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1859: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1859.jpg)
RemarksYoumustsetthispropertyforanyformbasedonastoredprocedurethatcontainsajoinorexpressioncolumn.Inallothercases,MicrosoftAccesscanfixtablesautomatically.Ifyoudonotsetthisproperty,userswillnotseefixed-upfieldvaluesafteranupdateorinsertion,buttheupdateorinsertionwillstillbeexecutedcorrectly.
![Page 1860: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1860.jpg)
ReturnValueProperty
Returnsorsetsthereturnvalueforthespecifiedevent.YoucancancelthedefaultactionforsomeeventsbysettingthispropertytoFalse.Read/writeBoolean.
expression.ReturnValue
expressionRequired.AnexpressionthatreturnsaDSCEventInfoobject.
![Page 1861: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1861.jpg)
ExampleThisexampleusestheBeforeInserteventtopreventtheuserfromaddinganotherrecordtotherecordsetonceitreaches75records.
SubMSODSC_BeforeInsert(DSCEventInfo)DimrstCurrentData
'Setavariabletotherecordset.SetrstCurrentData=DSCEventInfo.DataPage.Recordset
'Checktoseeiftherecordsethasreacheditslimit.IfrstCurrentData.RecordCount>=75then
'Displayamessagetotheuser.MsgBox"Cannotaddanymorerecords."
'Canceltheinsertionoftherecord.DSCEventInfo.ReturnValue=FalseEndIfEndSub
![Page 1862: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1862.jpg)
RevisionNumberProperty
ReturnstheMicrosoftOfficeWebComponentsrevisionnumber.Read-onlyString.
expression.RevisionNumber
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1863: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1863.jpg)
ShowAll
![Page 1864: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1864.jpg)
RightProperty
RightpropertyasitappliestotheChPlotAreaobject.
RightpropertyasitappliestotheChartSpace,ChAxis,ChCategoryLabel,ChChart,ChChartField,ChDataLabel,ChDataLabels,ChDropZone,ChErrorBars,ChLegend,ChLegendEntry,ChPoint,ChSeries,ChScrollView,ChTitle,andChTrendlineobjects.
![Page 1865: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1865.jpg)
RightToLeftProperty
Trueifright-to-leftlanguagesupportisenabled.Forexample,settingthispropertytoTruecausesscrollbarstobedisplayedontheleft.Read/writeBoolean.
expression.RightToLeft
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1866: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1866.jpg)
RotationProperty
ReturnsorsetsaDoubleindicatingtherotationindegreesofthespecifiedthree-dimensionalchart.Validvaluesrangefrom0to360.Read/write.
expression.Rotation
expressionRequired.AnexpressionthatreturnsaChChartobject.
![Page 1867: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1867.jpg)
ExampleThisexampleconvertsthefirstchartinChartspace1toa3-DColumnchartandthenrotatesthechart145degrees.
SubSetGapDepth()
Dimcht3DColumnAsChChart
'SetavariabletothefirstchartinChartspace1.Setcht3DColumn=ChartSpace1.Charts(0)
'Changethecharttoa3-DColumnchart.cht3DColumn.Type=chChartTypeColumn3D
'Rotatethechart.cht3DColumn.Rotation=145
EndSub
![Page 1868: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1868.jpg)
RowProperty
Returnsthenumberofthefirstrowinthespecifiedrange.Read-onlyLong.
expression.Row
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1869: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1869.jpg)
ExampleThisexamplemakeseveryotherrowgreeninthecurrentregionforcellA1.
SubFormatRows()
DimrngCurrentRow
'Loopthroughalloftherowsinthecurrentregion.ForEachrngCurrentRowInSpreadsheet1.Cells(1,1).CurrentRegion.Rows
'Checktoseeiftherownumberisanevennumber.IfrngCurrentRow.RowMod2=0Then
'Settheinteriorcoloroftherow.rngCurrentRow.Interior.Color="LightGreen"EndIfNextEndSub
![Page 1870: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1870.jpg)
RowAxisProperty
PivotDataobject:ReturnsaPivotResultRowAxisobjectthatrepresentstherowaxis.
PivotViewobject:ReturnsaPivotGroupAxisobjectthatrepresentstherowaxis.
expression.RowAxis
expressionRequired.AnexpressionthatreturnsoneoftheobjectintheAppliesTolist.
![Page 1871: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1871.jpg)
ExampleThisexampleinsertstwofieldsetsintothePivotTablelistintheactiveview.
SubAddFieldsToPT()
DimptView
SetptView=PivotTable1.ActiveView
ptView.ColumnAxis.InsertFieldSetptView.FieldSets("StoreType")
ptView.RowAxis.InsertFieldSetptView.FieldSets("Promotions")
EndSub
![Page 1872: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1872.jpg)
RowHeadingsProperty
ReturnsaHeadingscollectionthatrepresentstherowheadingsinthespecifiedwindow.UsetheCaptionpropertytocustomizetherowheadings.
expression.RowHeadings
expressionRequired.AnexpressionthatreturnsaWindowobject.
![Page 1873: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1873.jpg)
ExampleThisexamplesetsthecreatesacustomdataentrysheetbydisablingsomeuserinterfaceelements,limitingtheviewablerangeintheactivewindow,andcustomizingtherowandcolumnheadings.
SubCreate_Datasheet()DimhdrColHeadingsDimhdrRowHeadingsDimwndActive
SetwndActive=Spreadsheet1.ActiveWindow
'HidevariousUIelements.wndActive.DisplayWorkbookTabs=FalseSpreadsheet1.DisplayToolbar=False
'Displaythetitlebarandsetit'scaption.Spreadsheet1.DisplayTitleBar=TrueSpreadsheet1.TitleBar.Caption="RevenueWorksheet"
'Resizethespreadsheetcomponent.Spreadsheet1.AutoFit=True
'Limittheviewablerangeoftheactivesheet.wndActive.ViewableRange="A1:D5"
'Setavariabletothecolumnheadingsintheactivewindow.SethdrColHeadings=wndActive.ColumnHeadings
'Setavariabletotherowheadingsintheactivewindow.SethdrRowHeadings=wndActive.RowHeadings
![Page 1874: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1874.jpg)
'SettheheadingsofcolumnsAthroughD.hdrColHeadings(1).Caption="Qtr1"hdrColHeadings(2).Caption="Qtr2"hdrColHeadings(3).Caption="Qtr3"hdrColHeadings(4).Caption="Qtr4"
'Settheheadingsofrows1though5.hdrRowHeadings(1).Caption="1996"hdrRowHeadings(2).Caption="1997"hdrRowHeadings(3).Caption="1998"hdrRowHeadings(4).Caption="1999"hdrRowHeadings(5).Caption="2000"EndSub
![Page 1875: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1875.jpg)
RowHeightProperty
Returnsorsetstheheight(inpoints)ofallrowsinthespecifiedrange.ReturnsNulliftherowsarenotallthesameheight.UsetheIsNullfunctiontodeterminewhetherthereturnvalueisNull.Read/writeVariant.
expression.RowHeight
expressionRequired.AnexpressionthatreturnsaRangeobject.
![Page 1876: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1876.jpg)
ExampleThisexamplesetstherowheightto15pointsforrows1through10.
Spreadsheet1.Range("a1:a10").RowHeight=15
![Page 1877: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1877.jpg)
RowMemberProperty
ReturnsaPivotRowMemberobjectthatrepresentstheinnermemberontherowaxisthatintersectsthespecifiedcell.
expression.RowMember
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1878: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1878.jpg)
RowMembersProperty
ReturnsaPivotRowMemberscollectionthatcontainsthemembersontherowaxis.
expression.RowMembers
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1879: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1879.jpg)
RemarksForinformationaboutreturningasinglememberofacollection,seeReturninganObjectfromaCollection.
![Page 1880: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1880.jpg)
RowsProperty
Rangeobject:ReturnsaRangeobjectthatrepresentsalltherowsinthespecifiedrange.
Spreadsheetobject:ReturnsaRangeobjectthatrepresentsalltherowsontheactiveworksheet.
Worksheetobject:ReturnsaRangeobjectthatrepresentsalltherowsonthespecifiedworksheet.
expression.Rows
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1881: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1881.jpg)
ExampleThisexamplemakeseveryotherrowboldinthecurrentregionforcellA1.
SubBoldEvenRows()
DimrngCurrentRow
'Loopthroughtherowsinthecurrentregion.ForEachrngCurrentRowInSpreadsheet1.Cells(1,1).CurrentRegion.
'Checkwhentherthecurrentrownumberisanevennumber.IfrngCurrentRow.RowMod2=0Then
'Boldthefontinthecurrentrow.rngCurrentRow.Font.Bold=TrueEndIfNextEndSub
Thisexamplemakesrow2bold.
Spreadsheet1.Rows(2).Font.Bold=True
![Page 1882: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1882.jpg)
ScalingProperty
ReturnstheChScalingobjectforthespecifiedaxis.
expression.Scaling
expressionRequired.AnexpressionthatreturnsaChAxisobject.
![Page 1883: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1883.jpg)
ExampleThisexampleaddsasecondvalue(y)axistotherightsideofthespecifiedchart.Thesecondaxisusesthesamescaleastheprimaryvalueaxis.
SubAddAxis()
DimchConstantsDimaxisScale
SetchConstants=ChartSpace1.Constants
SetaxisScale=ChartSpace1.Charts(0).Axes(chConstants.chAxisPositionLeft).
ChartSpace1.Charts(0).Axes.AddaxisScale
EndSub
![Page 1884: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1884.jpg)
ShowAll
![Page 1885: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1885.jpg)
ScalingsProperty
ReturnsaChScalingobjectforthespecifiedchartorseries.
expression.Scalings(Dimension)
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
DimensionRequiredChartDimensionsEnum.Specifiesthedimensiontobereturned.
![Page 1886: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1886.jpg)
ExampleThisexamplesetstheminimumvalueforthespecifiedChScalingobject.
SubSetScaling()
DimchConstants
SetchConstants=ChartSpace1.Constants
ChartSpace1.Charts(0).SeriesCollection(0).Scalings_(chConstants.chDimCategories).Minimum=-10EndSub
![Page 1887: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1887.jpg)
SchemaFieldsProperty
ReturnstheSchemaFieldscollectionforthespecifiedschemarowsource.
expression.SchemaFields
expressionRequired.AnexpressionthatreturnsaSchemaRowsourceobject.
![Page 1888: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1888.jpg)
RemarksForinformationaboutreturningasinglememberofacollection,seeReturninganObjectfromaCollection.
![Page 1889: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1889.jpg)
SchemaParametersProperty
ReturnstheSchemaParameterscollectionforthespecifiedschemarowsource.
expression.SchemaParameters
expressionRequired.AnexpressionthatreturnsaSchemaRowsourceobject.
![Page 1890: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1890.jpg)
RemarksForinformationaboutreturningasinglememberofacollection,seeReturninganObjectfromaCollection.
![Page 1891: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1891.jpg)
SchemaRelatedFieldsProperty
ReturnstheSchemaRelatedFieldscollectionforthespecifiedschemarelationship.
expression.SchemaRelatedFields
expressionRequired.AnexpressionthatreturnsaSchemaRelationshipobject.
![Page 1892: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1892.jpg)
RemarksForinformationaboutreturningasinglememberofacollection,seeReturninganObjectfromaCollection.
![Page 1893: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1893.jpg)
SchemaRelationshipsProperty
ReturnstheSchemaRelationshipscollectionforthedatasourcecontrol.
expression.SchemaRelationships
expressionRequired.AnexpressionthatreturnsaDataSourceControlobject.
![Page 1894: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1894.jpg)
SchemaRowsourcesProperty
ReturnstheSchemaRowsourcescollectionforthedatasourcecontrol.
expression.SchemaRowsources
expressionRequired.AnexpressionthatreturnsaDataSourceControlobject.
![Page 1895: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1895.jpg)
RemarksIndesignmode,thiscollectionisautomaticallypopulatedwithinformationfromthedatabase.Inbrowsemode,thiscollectioncontainsanyschemaobjectsthatareusedonthespecifiedpage,plusanythatareexplicitlyaddedbytheuser.
Forinformationaboutreturningasinglememberofacollection,seeReturninganObjectfromaCollection.
![Page 1896: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1896.jpg)
ScreenUpdatingProperty
Trueifscreenupdatingisturnedon.ThedefaultvalueisTrue.Read/writeBoolean.
expression.ScreenUpdating
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1897: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1897.jpg)
RemarksSettingthispropertytoFalsecausesthechartworkspaceorspreadsheettostopredrawing.Topreventscreenflickerortopreventtheuserfromseeingindividualupdates,setthispropertytoFalse,performyourupdateoperations,andthenresetthispropertytoTrue.AftersettingtheScreenUpdatingpropertytoFalse,thechartworkspaceorspreadsheetwillstillredrawiftheuserrefreshesthepage,andiftheRepaintmethodiscalledonthecontrol.
![Page 1898: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1898.jpg)
ExampleThisexampleturnsoffscreenupdating.
Spreadsheet1.ScreenUpdating=False
![Page 1899: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1899.jpg)
ScrollColumnProperty
Returnsorsetsthenumberoftheleftmostcolumninthepaneorwindow.Ifthepanesarefrozen,thispropertyexcludesthefrozenareas.Read/writeLong.
expression.ScrollColumn
expressionRequired.AnexpressionthatreturnsaWindowobject.
![Page 1900: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1900.jpg)
ExampleThisexamplemovescolumnCsothatit'stheleftmostcolumninthewindow.
Spreadsheet1.ActiveWindow.ScrollColumn=3
![Page 1901: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1901.jpg)
ScrollRowProperty
Returnsorsetsthenumberoftherowthatappearsatthetopofthepaneorwindow.Ifthepanesarefrozen,thispropertyexcludesthefrozenareas.Read/writeLong.
expression.ScrollRow
expressionRequired.AnexpressionthatreturnsaWindowobject.
![Page 1902: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1902.jpg)
ExampleThisexamplemovesrowtentothetopofthewindow.
Spreadsheet1.ActiveWindow.ScrollRow=10
![Page 1903: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1903.jpg)
ScrollViewProperty
YouusetheScrollViewpropertytoreturntheChScrollViewobjectforachart.Read-onlyChScrollView.
expression.ScrollView
expressionRequired.AnexpressionthatreturnsaChChartobject.
![Page 1904: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1904.jpg)
Remarks
TheChartSpaceobjectsupportsmultiplechartsandeachiscanbescrolledindependently.ThereisoneChScrollViewobjectperchart.YouusethepropertiesandmethodsoftheChScrollViewobjecttoretrieveinformationaboutandcontrolthescrollviewofachart.
![Page 1905: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1905.jpg)
ExampleThefollowingexampleusestheScrollViewpropertytoworkwiththeSetPositionmethodoftheChScrollViewobject:
Chartspace1.Charts(1).ScrollView.SetPosition(HorizontalPosition.Value+200,VerticalPosition.Value+200)
![Page 1906: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1906.jpg)
SectionProperty
ReturnsaSectionobjectthatrepresentsthesectionwherethespecifiedeventoccurred.
expression.Section
expressionRequired.AnexpressionthatreturnsaDSCEventInfoobject.
![Page 1907: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1907.jpg)
SegmentsProperty
ReturnsaChSegmentsobjectthatrepresentsthecollectionofsegmentsinthespecifiedformatmap.
expression.Segments
expressionRequired.AnexpressionthatreturnsaChFormatMapobject.
![Page 1908: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1908.jpg)
ExampleThisexamplebindsChartspace1totheOrderDetailstableintheSQLServerNorthwinddatabase.Then,aformatmapiscreated.Thesmallervaluesaredisplayedinwhite,thenlargervaluesaredisplayedinalightshadeofblue,andfinallythelargervaluesinthechartaredisplayedwithindarkblue.
SubWindow_Onload()
DimserSeries1DimsegSegment1Dimchconstants
Setchconstants=ChartSpace1.Constants
'ThefollowingtwolinesofcodebindChartspace1totheOrderDetailstableinthe'NorthwindSQLServerdatabase.ChartSpace1.ConnectionString="Provider=SQLOLEDB.1;persistSecurityInfo=TRUE;"&_"IntegratedSecurity=SSPI;InitialCatalog=Northwind;"&_"DataSource=DataServer;"ChartSpace1.DataMember="OrderDetails"
'ThefollowingtwolinesofcodebindChartspace1totheQuantityandProductIDfields'intheOrderDetailstable.ChartSpace1.SetDatachconstants.chDimCategories,chconstants.chDataBound,"ProductID"ChartSpace1.SetDatachconstants.chDimValues,chconstants.chDataBound,"Quantity"
'Createaformatmap.ChartSpace1.SetDatachconstants.chDimFormatValues,chconstants.chDataBound,"Quantity"
'SetavariabletothefirstseriesinthefirstchartinChartspace1.SetserSeries1=ChartSpace1.Charts(0).SeriesCollection(0)
![Page 1909: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1909.jpg)
'Addasegmenttotheformatmap.SetsegSegment1=serSeries1.FormatMap.Segments.Add
'Specifythatthedivisionsinformattingbecreatedautomatically.segSegment1.HasAutoDivisions=True
'Measurethesegmentboundariesbaseduponapercentage.segSegment1.Begin.ValueType=chconstants.chBoundaryValuePercentsegSegment1.End.ValueType=chconstants.chBoundaryValuePercent
'Setthebeginningvalueto0%,andtheendingvalueto100%.segSegment1.Begin.Value=0segSegment1.End.Value=1
'Formattheinteriorofthematchingvalues.segSegment1.Begin.Interior.Color="White"segSegment1.End.Interior.Color="Blue"
EndSub
![Page 1910: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1910.jpg)
SelectedSheetsProperty
ReturnsaSheetscollectionthatrepresentsalltheselectedsheetsinthespecifiedwindow.Thiscollectionwillonlycontainonesheet,theactivesheet.
expression.SelectedSheets
expressionRequired.AnexpressionthatreturnsaWindowobject.
![Page 1911: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1911.jpg)
SelectionProperty
ChartSpaceobject:ReturnsanObjectthatrepresentstheselectedobject.UsetheTypeNamefunctiontodeterminethetypeoftheselectedobject.
PivotTableobject:ReturnsorsetsanObjectthatrepresentstheselectedobject.
SpreadsheetandWindowobjects:ReturnsaRangeobjectthatrepresentstheselectedcells.
expression.Selection
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1912: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1912.jpg)
ExampleTheprocedureinthisexamplerunswhenevertheselectioninthechartworkspacechanges.Iftheuserselectsanaxis,theproceduredisplaystheminimumandmaximumvaluesfortheaxis.
SubChartSpace1_SelectionChange()
DimchConstantsDimminvalDimmaxval
SetchConstants=ChartSpace1.Constants
IfChartSpace1.SelectionType=chConstants.chSelectionAxisThen
minval=ChartSpace1.Selection.Scaling.Minimum
maxval=ChartSpace1.Selection.Scaling.Maximum
MsgBox"minimum="&minval&"maximum="&maxvalEndIf
EndSub
![Page 1913: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1913.jpg)
SelectionCollectionProperty
TheSelectionCollectionpropertytoreturnstheChSelectionCollectioncollectionoftheChartSpaceobject.
expression.SelectionCollection
expressionRequired.AnexpressionthatreturnsaChartSpaceobject.
![Page 1914: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1914.jpg)
RemarksTheChSelectionCollectionobjectcontainsallcurrentlyselectedobjectsinachart.Thefirstiteminthecollectionistheprimaryselection.Additionalitemsaresecondaryselections.ThenumberofitemsinthiscollectioncanneverbezerobecausetheobjectreturnedbyChartSpace.SelectionCollection(0)isthesameobjectasthatreturnedbytheSelectionpropertyoftheChartSpaceobject.Thefirstobjectinthecollectioncanbeanychartobjectselection,butallsubsequentobjectsmustbepoints.IftheSelectionpropertyisnullandtherearenosecondaryselections,theSelectionCollectionwillequal0.
MultipleitemscannotbeselectedintheuserinterfaceoftheChartcomponent.Itemsmustbeaddedtoorremovedfromaselectionprogrammatically.Tocapturemultipleselectionswhenauserclicksonachart,youmustmonitorthemousemoveandmousebuttoneventsandidentifytheitemsbeingselectedusingtheRangeFromPointmethodoftheChartSpaceobject.Topreventthebuilt-inselectionhandlingbehavioroftheChartcomponentfrominterferingwithprogrammatictrackingofmultipleselections,youmustmakesurethattheAllowUISelectionpropertyoftheChartSpaceobjectissettoFalse.
![Page 1915: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1915.jpg)
ExampleThefollowingexampleshowshowtousetheSelectionCollectionpropertytoiteratethroughasetofselecteddatapointsinachart.
DimintCountDimintIndexWithChartSpace.Charts(0).SeriesCollection(0).Points(0).Select21.Points(1).Select21.Points(2).Select21.Points(3).Select21.Points(4).Select21EndWithintCount=ChartSpace.SelectionCollection.Count
ForintIndex=0TointCount-1MsgBox"Item("&iIndex&")="&TypeName(ChartSpace.SelectionCollectionNext
![Page 1916: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1916.jpg)
ShowAll
![Page 1917: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1917.jpg)
SelectionTypeProperty
ChartSpaceobject:ReturnsaChartSelectionsEnumconstantthatrepresentsthetypeofobjectcurrentlyselectedinthechartworkspace.Read-only.
PivotTableobject:ReturnsaStringthatrepresentsthetypeofobjectcurrentlyselectedinthePivotTablelist.Read-only.
expression.SelectionType
expressionRequired.AnexpressionthatreturnsaChartSpaceorPivotTableobject.
![Page 1918: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1918.jpg)
ExampleTheprocedureinthisexamplerunswhenevertheselectioninthechartworkspacechanges.Iftheuserselectsanaxis,theproceduredisplaystheminimumandmaximumvaluesfortheaxis.
SubChartSpace1_SelectionChange()
DimchConstantsDimminvalDimmaxval
SetchConstants=ChartSpace1.Constants
IfChartSpace1.SelectionType=chConstants.chSelectionAxisThen
minval=ChartSpace1.Selection.Scaling.Minimum
maxval=ChartSpace1.Selection.Scaling.Maximum
MsgBox"minimum="&minval&"maximum="&maxvalEndIf
EndSub
![Page 1919: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1919.jpg)
SeparatorProperty
Returnsorsetsthestringthatseparatesdatalabelcomponentsinthespecifiedseriesorchart.Read/writeString.
expression.Separator
expressionRequired.AnexpressionthatreturnsaChDataLabelsobject.
![Page 1920: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1920.jpg)
ExampleThisexamplechangesthedata-labelseparatorcharacterforthespecifiedseries.
SubFormatDataLabels()
DimdlDataLabels
'Adddatalabelstothefirstseries.SetdlDataLabels=ChartSpace1.Charts(0).SeriesCollection(0)_.DataLabelsCollection.Add
'Displaythecategorynameinthedatalabels.dlDataLabels.HasCategoryName=True
'Setthedatalabelseperator.dlDataLabels.Separator=":"
EndSub
![Page 1921: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1921.jpg)
SeriesCollectionProperty
ReturnstheChSeriesCollectioncollectionforthespecifiedchart.
expression.SeriesCollection
expressionRequired.AnexpressionthatreturnsaChChartobject.
![Page 1922: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1922.jpg)
RemarksForinformationaboutreturningasinglememberofacollection,seeReturninganObjectfromaCollection.
![Page 1923: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1923.jpg)
ExampleThisexamplesetsthelinecolortoredforthespecifiedseries.
ChartSpace1.Charts(0).SeriesCollection(0).Line.Color="red"
![Page 1924: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1924.jpg)
ServerFilterProperty
Returnsorsetstheserverfilterforthespecifiedobject.Read/writeString.
expression.ServerFilter
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1925: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1925.jpg)
RemarksAserverfilterisacriterionforspecifyingthetypeortypesofrecordstobefetchedfromtheserver.ThedatamodeladdsaserverfilterstringtotheWHEREclauseoftheSQLstatementthatitgenerates.YoucansetaserverfilteronlyonrecordsetsthathaveaprimaryrowsourceoftypedscTableordscView.
![Page 1926: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1926.jpg)
ShowAll
![Page 1927: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1927.jpg)
SheetsProperty
SheetspropertyasitappliestotheSpreadsheetobject.
SheetspropertyasitappliestotheWorkbookobject.
![Page 1928: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1928.jpg)
ExampleAsitappliestotheWorkbookobject.
![Page 1929: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1929.jpg)
ShowAllProperty
ClearsAutoFiltercriteriawhensettoTrue.AddingcriteriasetsthispropertytoFalse.IftherearenocriteriaandthispropertyissettoFalse,nodatawillbeshown.Read/writeBoolean.
expression.ShowAll
expressionRequired.AnexpressionthatreturnsaCriteriaobject.
![Page 1930: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1930.jpg)
ExampleThisexampleclearstheAutoFiltercriteriaforcolumn1ontheactiveworksheetandreappliestheAutoFiltertotheworksheet.
SubReapplyAutoFilter()
DimafAutoFilter
'Setavariabletothecurrentfiltersettings.SetafAutoFilter=Spreadsheet1.ActiveSheet.AutoFilter
'Showallrecords.afAutoFilter.Filters(1).Criteria.ShowAll=True
'Reapplythefilters.afAutoFilter.Apply
EndSub
![Page 1931: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1931.jpg)
ShowAll
![Page 1932: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1932.jpg)
ShowAsProperty
ReturnsorsetsaPivotShowAsEnumconstantthatrepresentshowaPivotTotalobjectisdisplayed.Read-write.
expression.ShowAs
expressionRequired.AnexpressionthatreturnsaPivotTotalobject.
![Page 1933: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1933.jpg)
ExampleThisexampleaddsanewtotaltoPivotTable1.Thenewtotalisformattedtodisplayasapercentageoftheparentrowfield,andwillnotappearinthePivotTableFieldListdialogbox.
SubAdd_Total()
DimvwViewDimptConstantsDimtotNewTotal
SetvwView=PivotTable1.ActiveViewSetptConstants=PivotTable1.Constants
'Addanewtotalnamed"TotalBudget"tothecurrentview.SettotNewTotal=vwView.AddTotal("TotalBudget",vwView.FieldSets("Budget").Fields(0),_ptConstants.plFunctionSum)
'InsertthenewlycreatedtotalintothedetailareaofthePivotTable.vwView.DataAxis.InsertTotaltotNewTotal
'Showthetotalsasapercentageoftheparentrowfield.totNewTotal.ShowAs=ptConstants.plShowAsPercentOfRowParent
'DonotdisplaythenewtotalinthePivotTableFieldListdialogbox.totNewTotal.DisplayInFieldList=False
EndSub
![Page 1934: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1934.jpg)
ShowAsValueProperty
ReturnsaVariantthatrepresentsthevalueofthespecifiedPivotAggregateobjectwithoutpercentageformatting.Usethispropertytoreturnthevalueofacell'saggregatewhentheShowAspropertyhasbeensettooneofthefollowingvalues:plShowAsPercentOfColumnParent,plShowAsPercentOfColumnTotal,plShowAsPercentOfGrandTotal,plShowAsPercentOfRowParent,plShowAsPercentOfRowTotal.Read-only.
expression.ShowAsValue
expressionRequired.AnexpressionthatreturnsaPivotAggregateobject.
![Page 1935: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1935.jpg)
ExampleThisexampledisplaystheaggregateforthethirdmemberoftherowfieldinamessagebox.
SubGetTotal()
DimptDataDimpmRowMemDimpmColMem
'SetavariabletothePivotTabledata.SetptData=PivotTable1.ActiveData
'Setavariabletothethirditemcontainedinthefield'thathasbeenaddedtotherowaxis.SetpmRowMem=ptData.RowAxis.Member.ChildMembers(2)
'Inthisexample,therearenofieldsonthecolumnaxis.SetpmColMem=ptData.ColumnAxis.Member
'Displaythevalueoftheaggregate.MsgBoxptData.Cells(pmRowMem,pmColMem).Aggregates(0).ShowAsValue
EndSub
![Page 1936: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1936.jpg)
ShowDelButtonProperty
TrueiftheDeletebutton(recordnavigationcontrol)isdisplayed.ThedefaultvalueisTrue.Read/writeBoolean.
expression.ShowDelButton
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1937: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1937.jpg)
ShowFilterBySelectionButtonProperty
TrueiftheFilterbySelectionbutton(recordnavigationcontrol)isdisplayed.ThedefaultvalueisTrue.Read/writeBoolean.
expression.ShowFilterBySelectionButton
expressionRequired.AnexpressionthatreturnsaRecordNavigationControlobject.
![Page 1938: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1938.jpg)
ShowFirstButtonProperty
TrueiftheFirstbutton(recordnavigationcontrol)isdisplayed.ThedefaultvalueisTrue.Read/writeBoolean.
expression.ShowFirstButton
expressionRequired.AnexpressionthatreturnsaRecordNavigationControlobject.
![Page 1939: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1939.jpg)
ShowHelpButtonProperty
TrueiftheHelpbutton(recordnavigationcontrol)isdisplayed.ThedefaultvalueisTrue.Read/writeBoolean.
expression.ShowHelpButton
expressionRequired.AnexpressionthatreturnsaRecordNavigationControlobject.
![Page 1940: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1940.jpg)
ShowLabelProperty
Trueiftherecordnavigationcontrollabelisdisplayed.ThedefaultvalueisTrue.Read/writeBoolean.
expression.ShowLabel
expressionRequired.AnexpressionthatreturnsaRecordNavigationControlobject.
![Page 1941: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1941.jpg)
ShowLastButtonProperty
TrueiftheLastbutton(recordnavigationcontrol)isdisplayed.ThedefaultvalueisTrue.Read/writeBoolean.
expression.ShowLastButton
expressionRequired.AnexpressionthatreturnsaRecordNavigationControlobject.
![Page 1942: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1942.jpg)
ShowNewButtonProperty
TrueiftheNewbutton(recordnavigationcontrol)isdisplayed.ThedefaultvalueisTrue.Read/writeBoolean.
expression.ShowNewButton
expressionRequired.AnexpressionthatreturnsaRecordNavigationControlobject.
![Page 1943: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1943.jpg)
ShowNextButtonProperty
TrueiftheNextbutton(recordnavigationcontrol)isdisplayed.ThedefaultvalueisTrue.Read/writeBoolean.
expression.ShowNextButton
expressionRequired.AnexpressionthatreturnsaRecordNavigationControlobject.
![Page 1944: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1944.jpg)
ShowPrevButtonProperty
TrueifthePreviousbutton(recordnavigationcontrol)isdisplayed.ThedefaultvalueisTrue.Read/writeBoolean.
expression.ShowPrevButton
expressionRequired.AnexpressionthatreturnsaRecordNavigationControlobject.
![Page 1945: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1945.jpg)
ShowSaveButtonProperty
TrueiftheSavebutton(recordnavigationcontrol)isdisplayed.ThedefaultvalueisTrue.Read/writeBoolean.
expression.ShowSaveButton
expressionRequired.AnexpressionthatreturnsaRecordNavigationControlobject.
![Page 1946: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1946.jpg)
ShowSortAscendingButtonProperty
TrueiftheSortAscendingbutton(recordnavigationcontrol)isdisplayed.ThedefaultvalueisTrue.Read/writeBoolean.
expression.ShowSortAscendingButton
expressionRequired.AnexpressionthatreturnsaRecordNavigationControlobject.
![Page 1947: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1947.jpg)
ShowSortDescendingButtonProperty
TrueiftheSortDescendingbutton(recordnavigationcontrol)isdisplayed.ThedefaultvalueisTrue.Read/writeBoolean.
expression.ShowSortDescendingButton
expressionRequired.AnexpressionthatreturnsaRecordNavigationControlobject.
![Page 1948: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1948.jpg)
ShowToggleFilterButtonProperty
TrueiftheToggleFilterbutton(recordnavigationcontrol)isdisplayed.ThedefaultvalueisTrue.Read/writeBoolean.
expression.ShowToggleFilterButton
expressionRequired.AnexpressionthatreturnsaRecordNavigationControlobject.
![Page 1949: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1949.jpg)
ShowUndoButtonProperty
TrueiftheUndobutton(recordnavigationcontrol)isdisplayed.ThedefaultvalueisTrue.Read/writeBoolean.
expression.ShowUndoButton
expressionRequired.AnexpressionthatreturnsaRecordNavigationControlobject.
![Page 1950: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1950.jpg)
SideWallProperty
ReturnsaChSurfaceobjectthatrepresentsthesidewallofathree-dimensionalchart.UsethepropertiesandmethodsofthereturnedChSurfaceobjecttoformatthesidewallofthespecifiedchart.
expression.SideWall
expressionRequired.AnexpressionthatreturnsaChPlotAreaobject.
![Page 1951: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1951.jpg)
ExampleThisexampleconvertsthefirstchartinChartspace1toa3-DColumnchartandthenformatsthebackwall,sidewall,andfloorofthechart.
SubFormatWallsFloor()
Dimcht3DColumnDimchConstantsDimpaPlotArea
SetchConstants=Chartspace1.Constants
'SetavariabletothefirstchartinChartspace1.Setcht3DColumn=ChartSpace1.Charts(0)
'Setavariabletotheplotarea.SetpaPlotArea=cht3DColumn.PlotArea
'Changethecharttoa3DColumnchart.cht3DColumn.Type=chConstants.chChartTypeColumnClustered3D
'Formatthebackwallofthechart.paPlotArea.BackWall.Interior.SetSolid"Yellow"paPlotArea.BackWall.Thickness=5
'Formatthesidewallofthechart.paPlotArea.SideWall.Interior.SetSolid"Yellow"paPlotArea.SideWall.Thickness=5
'Formatthefloorofthechart.paPlotArea.Floor.Interior.SetSolid"Blue"
![Page 1952: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1952.jpg)
paPlotArea.Floor.Thickness=5
EndSub
![Page 1953: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1953.jpg)
SizeProperty
Returnsorsetsthefontormarkersize(inpoints).ReturnsNullifitisusedonarangeinwhichthecharactersarenotallthesamesize.UsetheIsNullfunctiontodeterminewhetherthereturnvalueisNull.Read/writeVariantfortheFontobject;read/writeLongforallotherobjectsintheAppliesTolist.
expression.Size
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1954: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1954.jpg)
ExampleThisexamplesetsthefontsizeto6pointsforthespecifiedaxis.
Setc=ChartSpace1.ConstantsChartSpace1.Charts(0).Axes(c.chAxisPositionLeft).Font.Size=6
![Page 1955: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1955.jpg)
ShowAll
![Page 1956: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1956.jpg)
SizeRepresentsProperty
Returnsorsetswhatthebubblesizerepresentsonabubblechart.Read/writeChartSizeRepresentsEnum.
expression.SizeRepresents
expressionRequired.AnexpressionthatreturnsaChChartobject.
![Page 1957: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1957.jpg)
ExampleThisexamplesetstheSizeRepresentspropertyforabubblechart.
SubSetSizeParameter()
DimchConstants
SetchConstants=Chartspace1.Constants
ChartSpace1.Charts(0).SizeRepresents=chConstants.chSizeIsArea
EndSub
![Page 1958: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1958.jpg)
SolveOrderProperty
ReturnsorsetsaLongthatrepresentsthesolveorderforthespecifiedtotal.Read/write.
expression.SolveOrder
expressionRequired.AnexpressionthatreturnsaPivotTotalobject.
![Page 1959: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1959.jpg)
ShowAll
![Page 1960: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1960.jpg)
SortDirectionProperty
Returnsorsetsthedirectioninwhichthespecifiedfieldistobesorted.Read/writePivotFieldSortDirectionEnum.
expression.SortDirection
expressionRequired.AnexpressionthatreturnsaPivotFieldobject.
![Page 1961: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1961.jpg)
RemarksThefieldissortedbasedonthesortingrulesoftheunderlyingdataprovider.Forexample,adataprovidermightsortdatesalphanumerically(February,January,andsoon)orinachronologicalmonthlysequence(January,February,andsoon)
![Page 1962: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1962.jpg)
SortOnProperty
Returnsorsetsthetotalusedtosortthespecifiedfield.Read/writePivotTotal.
expression.SortOn
expressionRequired.AnexpressionthatreturnsaPivotFieldobject..
![Page 1963: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1963.jpg)
SortOnScopeProperty
Returnsorsetsthearrayofstringsusedtonarrowthesortingscopeforthespecifiedfield.Read/writeVariant.
expression.SortOnScope
expressionRequired.AnexpressionthatreturnsaPivotFieldobject.
![Page 1964: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1964.jpg)
SourceProperty
Returnsorsetsthesourceforthespecifiedpagefieldorpagerowsource.Read/writeString.
expression.Source
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 1965: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1965.jpg)
SourceAxisProperty
ReturnsaPivotAxisobjectthatrepresentsthesourceaxisofthespecifiedresultaxis.
expression.SourceAxis
expressionRequired.AnexpressionthatreturnsaPivotResultAxisobject.
![Page 1966: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1966.jpg)
SourceColumnAxisProperty
ReturnsaPivotGroupAxisobjectthatrepresentsthesourceaxisofthespecifiedresultaxis.
expression.SourceColumnAxis
expressionRequired.AnexpressionthatreturnsaPivotResultColumnAxisobject.
![Page 1967: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1967.jpg)
SourceDataAxisProperty
ReturnsaPivotDataAxisobjectthatrepresentsthesourceaxisofthespecifiedresultaxis.
expression.SourceDataAxis
expressionRequired.AnexpressionthatreturnsaPivotResultDataAxisobject.
![Page 1968: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1968.jpg)
SourceFieldProperty
ReturnsaPivotFieldobjectthatrepresentsthesourcefieldforthespecifiedresultfield.
expression.SourceField
expressionRequired.AnexpressionthatreturnsaPivotResultFieldobject.
![Page 1969: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1969.jpg)
SourceFilterAxisProperty
ReturnsaPivotFilterAxisobjectthatrepresentsthesourceaxisofthespecifiedresultaxis.
expression.SourceFilterAxis
expressionRequired.AnexpressionthatreturnsaPivotResultFilterAxisobject.
![Page 1970: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1970.jpg)
SourceLabelProperty
ReturnsaPivotLabelobjectthatrepresentsthesourcelabelofthespecifiedresultlabel.
expression.SourceLabel
expressionRequired.AnexpressionthatreturnsaPivotResultLabelobject.
![Page 1971: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1971.jpg)
SourceMemberProperty
ReturnsaPivotMemberobjectthatrepresentsthesourcememberforthespecifiedaxismember.
expression.SourceMember
expressionRequired.AnexpressionthatreturnsaPivotAxisMemberobject.
![Page 1972: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1972.jpg)
SourcePageAxisProperty
ReturnsaPivotGroupAxisobjectthatrepresentsthesourceaxisofthespecifiedresultaxis.
expression.SourcePageAxis
expressionRequired.AnexpressionthatreturnsaPivotResultPageAxisobject.
![Page 1973: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1973.jpg)
SourceRowAxisProperty
ReturnsaPivotGroupAxisobjectthatrepresentsthesourceaxisforthespecifiedresultaxis.
expression.SourceRowAxis
expressionRequired.AnexpressionthatreturnsaPivotResultRowAxisproperty.
![Page 1974: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1974.jpg)
SplitMaximumProperty
IfthespecifiedChScalingobjecthasasplit,thispropertyreturnsorsetsthemaximumvalueforthesplit.ThisvalueshouldbegreaterthanthevalueoftheSplitMinimumproperty.Read/writeDouble.
expression.SplitMaximum
expressionRequired.AnexpressionthatreturnsaChScalingobject.
![Page 1975: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1975.jpg)
ExampleThisexamplesplitsthevalueaxisofthefirstchartinChartSpace1andsetsthesplitminimumandsplitmaximumvalues.Thevalueaxisissplit,andvaluesbetween1000and5000willnotbedisplayed.
SubSplit_Value_Axis()DimchConstantsDimscValueAxisSetchConstants=ChartSpace1.Constants'Setavariabletothescalingobjectofthevalueaxis.SetscValueAxis=ChartSpace1.Charts(0).Axes(chConstants.chAxisPositionValue).Scaling'Addasplittothevalueaxis.scValueAxis.HasSplit=True'Specifytheminnimumvalueofthesplit.scValueAxis.SplitMinimum=1000'Specifythemaximumvalueforthesplit.scValueAxis.SplitMaximum=5000EndSub
![Page 1976: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1976.jpg)
SplitMinimumProperty
IfthespecifiedChScalingobjecthasasplit,thispropertyreturnsorsetstheminimumvalueforthesplit.ThisvalueshouldbelessthanthevalueoftheSplitMaximumproperty.Read/writeDouble.
expression.SplitMinimum
expressionRequired.AnexpressionthatreturnsaChScalingobject.
![Page 1977: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1977.jpg)
ExampleThisexamplesplitsthevalueaxisofthefirstchartinChartSpace1andsetsthesplitminimumandsplitmaximumvalues.Thevalueaxisissplit,andvaluesbetween1000and5000willnotbedisplayed.
SubSplit_Value_Axis()DimchConstantsDimscValueAxisSetchConstants=ChartSpace1.Constants'Setavariabletothescalingobjectofthevalueaxis.SetscValueAxis=ChartSpace1.Charts(0).Axes(chConstants.chAxisPositionValue).Scaling'Addasplittothevalueaxis.scValueAxis.HasSplit=True'Specifytheminnimumvalueofthesplit.scValueAxis.SplitMinimum=1000'Specifythemaximumvalueforthesplit.scValueAxis.SplitMaximum=5000EndSub
![Page 1978: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1978.jpg)
StandardHeightProperty
Returnsthestandard(default)heightofalltherowsintheworksheetinpoints.Read-onlyDouble.
expression.StandardHeight
expressionRequired.AnexpressionthatreturnsaWorksheetobject.
![Page 1979: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1979.jpg)
ExampleThisexampleresetstherowsandcolumnsintheactivesheetofSpreadsheet1totheirdefaultsize.
SubReset_Height_Width()DimshtActiveSetshtActive=Spreadsheet1.ActiveSheet
shtActive.Rows.RowHeight=shtActive.StandardHeightshtActive.Columns.ColumnWidth=shtActive.StandardWidthEndSub
![Page 1980: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1980.jpg)
StandardWidthProperty
Returnsthestandard(default)widthofallthecolumnsintheworksheet.ThewidthofonecharacterintheNormalstyleisusedastheunitofmeasure.Read/writeDouble.
expression.StandardWidth
expressionRequired.AnexpressionthatreturnsaWorksheetobject.
![Page 1981: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1981.jpg)
ExampleThisexampleresetstherowsandcolumnsintheactivesheetofSpreadsheet1totheirdefaultsize.
SubReset_Height_Width()DimshtActiveSetshtActive=Spreadsheet1.ActiveSheet
shtActive.Rows.RowHeight=shtActive.StandardHeightshtActive.Columns.ColumnWidth=shtActive.StandardWidthEndSub
![Page 1982: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1982.jpg)
ShowAll
![Page 1983: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1983.jpg)
StatusProperty
ReturnsaDscStatusEnumconstantthatrepresentsthestatusofthecurrentevent.ThispropertyissupportedonlyintheAfterDeleteevent.Read-only.
expression.Status
expressionRequired.AnexpressionthatreturnsaDSCEventInfoobject.
![Page 1984: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1984.jpg)
RemarksUsingthispropertywithanunsupportedeventwillresultinarun-timeerror.
![Page 1985: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1985.jpg)
ShowAll
![Page 1986: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1986.jpg)
StyleProperty
Returnsorsetsthemarkerstyleforthespecifiedseriesorchart.Read/writeChartMarkerStyleEnum.
expression.Style
expressionRequired.AnexpressionthatreturnsaChMarkerobject.
![Page 1987: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1987.jpg)
ExampleThisexamplesetsthemarkerstyleforthespecifiedseries.
SubSetMarkerStyle()
DimchConstants
SetchConstants=ChartSpace1.Constants
ChartSpace1.Charts(0).SeriesCollection(0).Marker_.Style=chConstants.chMarkerStyleStar
EndSub
![Page 1988: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1988.jpg)
SublistRelationshipsProperty
ReturnstheSublistRelationshipscollectionforthespecifiedrecordsetdefinition.
expression.SublistRelationships
expressionRequired.AnexpressionthatreturnsaRecordsetDefobject.
![Page 1989: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1989.jpg)
RemarksAsublistrelationshipreferstoarowsourceinanotherrecordsetdefinitionthathasamany-to-onerelationshipwiththeprimarypagerowsourceinthespecifiedrecordsetdefinition.
Forinformationaboutreturningasinglememberofacollection,seeReturninganObjectfromaCollection.
![Page 1990: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1990.jpg)
SublistSchemaRelationshipsProperty
ReturnstheSublistSchemaRelationshipscollectionforthespecifiedschemarowsource.
expression.SublistSchemaRelationships
expressionRequired.AnexpressionthatreturnsaSchemaRowsourceobject.
![Page 1991: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1991.jpg)
RemarksForinformationaboutreturningasinglememberofacollection,seeReturninganObjectfromaCollection.
![Page 1992: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1992.jpg)
SubtotalBackColorProperty
Returnsorsetsthebackcolorforthesubtotalinthespecifiedfield.Forsubtotals,thisproperty’ssettingoverridestheTotalBackColorpropertysetting.Read/writeVariant.
expression.SubtotalBackColor
expressionRequired.AnexpressionthatreturnsaPivotFieldobject.
![Page 1993: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1993.jpg)
RemarksWhenyousetthisproperty,youcanuseeitheraLongvaluerepresentingared-green-bluecolorvalueoraStringvaluenamingavalidHTMLcolorvalue.Forexample,tosettheobjectcolortored,youcouldusethehexadecimalvalue&HFF,thedecimalvalue255,orthestringvalue"red."InMicrosoftVisualBasic,youcanusetheRGBfunctiontocreateared-green-bluecolorvalue(redisRGB(255,0,0)).ThispropertyalwaysreturnsthecolorasaLongvaluerepresentingared-green-bluecolorvalue.
![Page 1994: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1994.jpg)
SubtotalFontProperty
ReturnsaPivotFontobjectthatrepresentsthefontforsubtotals.
expression.SubtotalFont
expressionRequired.AnexpressionthatreturnsaPivotFieldobject.
![Page 1995: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1995.jpg)
SubtotalForeColorProperty
Returnsorsetstheforegroundcolorforsubtotalsinthespecifiedfield.Thisproperty’ssettingoverridestheTotalForeColorpropertysetting.Read/writeVariant.
expression.SubtotalForeColor
expressionRequired.AnexpressionthatreturnsaPivotFieldobject.
![Page 1996: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1996.jpg)
RemarksWhenyousetthisproperty,youcanuseeitheraLongvaluerepresentingared-green-bluecolorvalueoraStringvaluenamingavalidHTMLcolorvalue.Forexample,tosettheobjectcolortored,youcouldusethehexadecimalvalue&HFF,thedecimalvalue255,orthestringvalue"red."InMicrosoftVisualBasic,youcanusetheRGBfunctiontocreateared-green-bluecolorvalue(redisRGB(255,0,0)).ThispropertyalwaysreturnsthecolorasaLongvaluerepresentingared-green-bluecolorvalue.
![Page 1997: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1997.jpg)
SubtotalLabelBackColorProperty
Returnsorsetsthebackcolorforthesubtotalinthespecifiedfield.Read/writeVariant.
expression.SubtotalLabelBackColor
expressionRequired.AnexpressionthatreturnsaPivotFieldobject.
![Page 1998: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1998.jpg)
RemarksWhenyousetthisproperty,youcanuseeitheraLongvaluerepresentingared-green-bluecolorvalueoraStringvaluenamingavalidHTMLcolorvalue.Forexample,tosettheobjectcolortored,youcouldusethehexadecimalvalue&HFF,thedecimalvalue255,orthestringvalue"red."InMicrosoftVisualBasic,youcanusetheRGBfunctiontocreateared-green-bluecolorvalue(redisRGB(255,0,0)).ThispropertyalwaysreturnsthecolorasaLongvaluerepresentingared-green-bluecolorvalue.
![Page 1999: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/1999.jpg)
SubtotalLabelFontProperty
ReturnsaPivotFontobjectthatrepresentsthefontforsubtotallabelsinthespecifiedfield.
expression.SubtotalLabelFont
expressionRequired.AnexpressionthatreturnsaPivotFieldobject.
![Page 2000: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2000.jpg)
SubtotalLabelForeColorProperty
Returnsorsetstheforegroundcolorforsubtotallabelsinthespecifiedfield.Read/writeVariant.
expression.SubtotalLabelForeColor
expressionRequired.AnexpressionthatreturnsaPivotFieldobject.
![Page 2001: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2001.jpg)
RemarksWhenyousetthisproperty,youcanuseeitheraLongvaluerepresentingared-green-bluecolorvalueoraStringvaluenamingavalidHTMLcolorvalue.Forexample,tosettheobjectcolortored,youcouldusethehexadecimalvalue&HFF,thedecimalvalue255,orthestringvalue"red."InMicrosoftVisualBasic,youcanusetheRGBfunctiontocreateared-green-bluecolorvalue(redisRGB(255,0,0)).ThispropertyalwaysreturnsthecolorasaLongvaluerepresentingared-green-bluecolorvalue.
![Page 2002: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2002.jpg)
ShowAll
![Page 2003: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2003.jpg)
SubtotalLabelHAlignmentProperty
ReturnsorsetsaPivotHAlignmentEnumconstantthatrepresentsthehorizontalalignmentofthesubtotallabelsforthespecifiedfield.Read/write.
expression.SubtotalLabelHAlignment
expressionRequired.AnexpressionthatreturnsaPivotFieldobject.
![Page 2004: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2004.jpg)
SubtotalsProperty
Trueifthesubtotalisdisplayedforthespecifiedfield.Read/writeBoolean.
expression.Subtotals(Subtotals)
expressionAnexpressionthatreturnsaPivotFieldobject.Thefieldmustbeonaroworcolumnaxis.
SubtotalsRequiredLong.Specifiesthesubtotal.
![Page 2005: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2005.jpg)
TabRatioProperty
Returnsorsetstheratioofthewidthoftheworkbook'stabareatothewidthofthewindow'shorizontalscrollbar(asanumberbetween0(zero)and1;thedefaultvalueis0.6).Changingthevalueofthispropertyhasaninverseeffectonthelengthofthewindow'shorizontalscrollbar.Increasingthispropertyfromthedefaultvaluedecreasesthelengthofthescrollbar,whiledecreasingthispropertyfromthedefaultvalueincreasesthelengthofthescrollbar.Read/writeDouble.
expression.TabRatio
expressionRequired.AnexpressionthatreturnsaWindowobject.
![Page 2006: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2006.jpg)
ExampleThisexamplemakestheworkbooktabhalfthewidthofthehorizontalscrollbar.
Spreadsheet1.ActiveWindow.TabRatio=0.5
![Page 2007: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2007.jpg)
ShowAll
![Page 2008: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2008.jpg)
TextProperty
TextpropertyasitappliestothePivotAggregateandPivotDetailCellobjects.
TextpropertyasitappliestotheRangeobject.
![Page 2009: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2009.jpg)
ExampleThisexamplesetsavariablefortheformattedvalueofcellA1.
txt=Spreadsheet1.Range("a1").Text
![Page 2010: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2010.jpg)
ShowAll
![Page 2011: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2011.jpg)
TextureFormatProperty
ReturnsaChartTextureFormatEnumconstantindicatingtheformatusedtodisplaythetextureforthespecifiedChInteriorobject.Thispropertywillreturnarun-timeerrorifthespecifiedinteriorisnotfilledwithatextureorapicture.Read-only.
expression.TextureFormat
expressionRequired.AnexpressionthatreturnsaChInteriorobject.
![Page 2012: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2012.jpg)
TextureNameProperty
ReturnsaStringindicatingthenameofandpathtothepicturefilethatwasusedtofillthespecifiedChInteriorobject.Thispropertywillreturnarun-timeerroriftheinteriorofthespecifiedobjectwassettoapresettexture.Read-only.
expression.TextureName
expressionRequired.AnexpressionthatreturnsaChInteriorobject.
![Page 2013: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2013.jpg)
RemarksUsetheSetTexturedmethodtosetthetexturefileforthefill.
![Page 2014: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2014.jpg)
ShowAll
![Page 2015: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2015.jpg)
TexturePlacementProperty
ReturnsaChartTexturePlacementEnumconstantindicatinghowthetexturehasbeenappliedtothespecifiedChInteriorobject.Read-only.
expression.TexturePlacement
expressionRequired.AnexpressionthatreturnsaChInteriorobject.
![Page 2016: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2016.jpg)
RemarksThispropertyonlyaffects3-Dcharts.
![Page 2017: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2017.jpg)
TextureStackUnitProperty
ReturnsaDoubleindicatingthetexturestackunitforthespecifiedChInteriorobject.Thispropertywillreturnarun-timeerrorunlesstheSetTexturemethodwasusedtofilltheinterioroftheobjectandthemethod'sTextureFormatargumentissettoavalueofchStackScale.Read-only.
expression.TextureStackUnit
expressionRequired.AnexpressionthatreturnsaChInteriorobject.
![Page 2018: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2018.jpg)
ThicknessProperty
ReturnsorsetsaLongspecifyingthethicknessofthespecifieddataseriesorsurfaceinathree-dimensionalchart.Read/write.
expression.Thickness
expressionRequired.AnexpressionthatreturnsaChSeriesoraChSurfaceobject.
![Page 2019: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2019.jpg)
RemarksUsethispropertytosetthethicknessofalineina3-DLinechartorthethicknessofthepieina3-DPiechart.
![Page 2020: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2020.jpg)
ExampleThisexampleconvertsthefirstchartinChartspace1toa3-DLinechartandthensetsthethicknessforeachlineinthechart.
SubSetLineThickness()
Dimcht3DLineDimserSeries
'SetavariabletothefirstchartinChartspace1.Setcht3DLine=ChartSpace1.Charts(0)
'Changethecharttoa3DLinechart.cht3DLine.Type=chChartTypeLine3D
'Setthethicknessofeachlineinthechart.ForEachserSeriesIncht3DLine.SeriesCollectionserSeries.Thickness=4NextEndSub
![Page 2021: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2021.jpg)
TickLabelSpacingProperty
Returnsorsetsthenumberofcategoriesbetweentick-marklabelsforthespecifiedaxis.Appliesonlytocategoryaxes.Read/writeLong.
expression.TickLabelSpacing
expressionRequired.AnexpressionthatreturnsaChAxisobject.
![Page 2022: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2022.jpg)
ExampleThisexamplesetsthenumberofcategoriesbetweentick-marklabelsforthespecifiedaxistotwo.
ChartSpace1.Charts(0).Axes(1).TickLabelSpacing=2
![Page 2023: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2023.jpg)
ShowAll
![Page 2024: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2024.jpg)
TickLabelUnitTypeProperty
ReturnsorsetsaChartAxisUnitTypeEnumconstantthatrepresentstheintervalusedtodisplaytickmarklabelsonatime-scaledcategoryaxis.Read/write.
expression.TickLabelUnitType
expressionRequired.AnexpressionthatreturnsaChAxisobject.
![Page 2025: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2025.jpg)
ExampleThisexampleconvertsthefirstchartinChartspace1toalinechart,thenformatsthecategoryaxissothatthevaluesaregroupedbymonth.Theaveragevalueofeachmonthisdisplayedonthechart.
SubFormatTimeScaling()
DimchConstantsDimaxCategory
SetchConstants=ChartSpace1.Constants
'ChangethecharttoaLinechart.ChartSpace1.Charts(0).Type=chConstants.chChartTypeLine
'Setavariabletothecategoryaxis.SetaxCategory=ChartSpace1.Charts(0).Axes(chConstants.chAxisPositionCategory)
'Specifythatyouwilldeterminethegroupingsettingsofthe'axis.Notethatthislineofcodeisnecessaryonlyifthe'GroupingTypepropertyfortheaxishasbeenpreviouslysetto'chAxisGroupingNone.axCategory.GroupingType=chConstants.chAxisGroupingManual
'Groupthecategoryaxisbymonth.axCategory.GroupingUnitType=chConstants.chAxisUnitMonth
'Createanewgroupingforeverymonth.axCategory.GroupingUnit=1
'Displaytheaverageoftheitemsineachgroup.
![Page 2026: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2026.jpg)
axCategory.GroupingTotalFunction=chConstants.chFunctionAvg
'Aticklabelisdisplayedforeverymonth.axCategory.TickLabelUnitType=chConstants.chAxisUnitMonth
'Atickmarkisdisplayedforeverythreemonths.axCategory.TickMarkUnitType=chConstants.chAxisUnitQuarter
EndSub
![Page 2027: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2027.jpg)
TickMarkSpacingProperty
Returnsorsetsthenumberofcategoriesbetweentickmarksonthespecifiedaxis.Appliesonlytocategoryaxes.UsetheMajorUnitandMinorUnitpropertiestosettick-markspacingonvalueaxes.Read/writeLong.
expression.TickMarkSpacing
expressionRequired.AnexpressionthatreturnsaChAxisobject.
![Page 2028: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2028.jpg)
ExampleThisexamplesetsthenumberofcategoriesbetweentickmarksonthespecifiedaxistotwo.
ChartSpace1.Charts(0).Axes(1).TickMarkSpacing=2
![Page 2029: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2029.jpg)
ShowAll
![Page 2030: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2030.jpg)
TickMarkUnitTypeProperty
ReturnsorsetsaChartAxisUnitTypeEnumconstantthatrepresentstheintervalusedtodisplaytickmarksonatime-scaledcategoryaxis.Read/write.
expression.TickMarkUnitType
expressionRequired.AnexpressionthatreturnsaChAxisobject.
![Page 2031: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2031.jpg)
ExampleThisexampleconvertsthefirstchartinChartspace1toalinechart,thenformatsthecategoryaxissothatthevaluesaregroupedbymonth.Theaveragevalueofeachmonthisdisplayedonthechart.
SubFormatTimeScaling()
DimchConstantsDimaxCategory
SetchConstants=ChartSpace1.Constants
'ChangethecharttoaLinechart.ChartSpace1.Charts(0).Type=chConstants.chChartTypeLine
'Setavariabletothecategoryaxis.SetaxCategory=ChartSpace1.Charts(0).Axes(chConstants.chAxisPositionCategory)
'Specifythatyouwilldeterminethegroupingsettingsofthe'axis.Notethatthislineofcodeisnecessaryonlyifthe'GroupingTypepropertyfortheaxishasbeenpreviouslysetto'chAxisGroupingNone.axCategory.GroupingType=chConstants.chAxisGroupingManual
'Groupthecategoryaxisbymonth.axCategory.GroupingUnitType=chConstants.chAxisUnitMonth
'Createanewgroupingforeverymonth.axCategory.GroupingUnit=1
'Displaytheaverageoftheitemsineachgroup.
![Page 2032: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2032.jpg)
axCategory.GroupingTotalFunction=chConstants.chFunctionAvg
'Aticklabelisdisplayedforeverymonth.axCategory.TickLabelUnitType=chConstants.chAxisUnitMonth
'Atickmarkisdisplayedforeverythreemonths.axCategory.TickMarkUnitType=chConstants.chAxisUnitQuarter
EndSub
![Page 2033: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2033.jpg)
TimeValueProperty
ReturnsaVariantthatrepresentsthevalueofthespecifiedmemberwiththeappropriatedateoftimeformat.Read-only.
expression.TimeValue
expressionRequired.AnexpressionthatreturnsaPivotMemberobject.
![Page 2034: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2034.jpg)
ShowAll
![Page 2035: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2035.jpg)
TipTextProperty
TipTextpropertyasitappliestotheChSeriesobject.
TipTextpropertyasitappliestotheOCCommandobject.
![Page 2036: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2036.jpg)
ExampleAsitappliestotheChSeriesobject.
![Page 2037: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2037.jpg)
TitleProperty
ReturnsaChTitleobjectthatrepresentsthetitleofthespecifiedaxisorchart.
expression.Title
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 2038: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2038.jpg)
ExampleThisexamplesetsthespecifiedcharttoincludeatitleandsetsthetitletext.
SubSetChartTitle()
'Enablethecharttitle.ChartSpace1.Charts(0).HasTitle=True
'Setthecharttitle.ChartSpace1.Charts(0).Title.Caption="SatisfactionData"
EndSub
![Page 2039: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2039.jpg)
ShowAll
![Page 2040: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2040.jpg)
TitleBarProperty
TitleBarpropertyasitappliestothePivotViewobject.
TitleBarpropertyasitappliestotheSpreadsheetobject.
![Page 2041: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2041.jpg)
ExampleThisexamplesetsthetitlecaptionforthespreadsheet.
Spreadsheet1.TitleBar.Caption="MonthlySales"
![Page 2042: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2042.jpg)
ToolbarProperty
ReturnsanMSComctlLib.Toolbarobjectthatrepresentsthetoolbar.
expression.Toolbar
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 2043: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2043.jpg)
RemarksUsethereturnedMSComctlLib.ToolbarobjecttocustomizethetoolbarintheMicrosoftOfficeWebComponents.Youcanaddorremovebuilt-inbuttonsaswellascustombuttons.
![Page 2044: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2044.jpg)
ShowAll
![Page 2045: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2045.jpg)
TopProperty
ToppropertyasitappliestotheChartSpace,ChCategoryLabel,ChChartField,ChDataLabel,ChDataLabels,ChErrorBars,ChLegendEntry,ChPoint,ChSeries,ChTrendline,PivotAggregate,PivotAxisMember,PivotColumnMember,PivotDetailCell,PivotPageMember,PivotResultAxis,PivotResultColumnAxis,PivotResultDataAxis,PivotResultFilterAxis,PivotResultGroupAxis,PivotResultLabel,PivotResultPageAxis,PivotResultRowAxis,PivotRowMember,andPivotTableobjects.
ToppropertyasitappliestotheChScrollViewobject.
ToppropertyasitappliestothePivotDataobject.
ToppropertyasitappliestotheRangeobject.
ToppropertyasitappliestotheWindowobject.
![Page 2046: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2046.jpg)
ExampleThisexamplesetsavariableforthedistancefromthetopofthespreadsheetwindowtocellA35.
t2=Spreadsheet1.Range("A35").Top
![Page 2047: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2047.jpg)
Top2Property
ReturnsaLongvaluethatrepresentsthetopofthedataareaofthePivotTablelist.Read-only.
expression.Top2
expressionRequired.AnexpressionthatreturnsaPivotDataobject.
![Page 2048: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2048.jpg)
RemarksThispropertywillreturnavalueof1ifthetoolbarisnotdisplayed.
![Page 2049: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2049.jpg)
ShowAll
![Page 2050: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2050.jpg)
TopLeftProperty
TopLeftpropertyasitappliestothePivotRangeobject.
TopLeftpropertyasitappliestothePivotDetailRangeobject.
![Page 2051: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2051.jpg)
TopOffsetProperty
ReturnsorsetsaLongvaluethatrepresentsthenumberofpixelstoscrollthedataareadown.Read/write.
expression.TopOffset
expressionRequired.AnexpressionthatreturnsaPivotDataobject.
![Page 2052: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2052.jpg)
RemarksUsetheLeftOffsettoscrollthedataareatotheleft.
![Page 2053: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2053.jpg)
ExampleThisexamplescrollsthedataareaofPivotTable1down45pixelsandleft45pixels.
SubScrollDataArea()
DimptData
SetptData=PivotTable1.ActiveData
'Scroll45pixelsdown.ptData.TopOffset=45
'Scrollthedataareatotheleft.ptData.LeftOffset=45
EndSub
![Page 2054: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2054.jpg)
TotalProperty
ReturnsaPivotTotalobjectthatrepresentsthetotalforthespecifiedaggregate.
expression.Total
expressionRequired.AnexpressionthatreturnsaPivotAggregateobject.
![Page 2055: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2055.jpg)
TotalAllMembersProperty
Trueiffilteredmembersareincludedinsubtotals.IfthispropertyissettoFalse,subtotalsdonotincludemembersthathavebeenfilteredoutoftheview.ThedefaultvalueisFalse.Read/writeBoolean.
expression.TotalAllMembers
expressionRequired.AnexpressionthatreturnsaPivotViewobject.
![Page 2056: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2056.jpg)
TotalBackColorProperty
Returnsorsetsthebackgroundcolorforalltotals.Read/writeVariant.
expression.TotalBackColor
expressionRequired.AnexpressionthatreturnsaPivotViewobject.
![Page 2057: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2057.jpg)
RemarksWhenyousetthisproperty,youcanuseeitheraLongvaluerepresentingared-green-bluecolorvalueoraStringvaluenamingavalidHTMLcolorvalue.Forexample,tosettheobjectcolortored,youcouldusethehexadecimalvalue&HFF,thedecimalvalue255,orthestringvalue"red."InMicrosoftVisualBasic,youcanusetheRGBfunctiontocreateared-green-bluecolorvalue(redisRGB(255,0,0)).ThispropertyalwaysreturnsthecolorasaLongvaluerepresentingared-green-bluecolorvalue.
![Page 2058: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2058.jpg)
TotalColumnMemberProperty
ReturnsaPivotColumnMemberobjectthatrepresentsthememberusedtodisplaythegrandtotal..
expression.TotalColumnMember
expressionRequired.AnexpressionthatreturnsaPivotColumnMemberobject.
![Page 2059: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2059.jpg)
TotalFontProperty
ReturnsaPivotFontobjectthatrepresentsthefontusedforaggregatesdisplayedinacellorinadetailgridfooter.
expression.TotalFont
expressionRequired.AnexpressionthatreturnsaPivotViewobject.
![Page 2060: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2060.jpg)
TotalForeColorProperty
Returnsorsetstheforegroundcolorforalltotals.Read/writeVariant.
expression.TotalForeColor
expressionRequired.AnexpressionthatreturnsaPivotViewobject.
![Page 2061: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2061.jpg)
RemarksWhenyousetthisproperty,youcanuseeitheraLongvaluerepresentingared-green-bluecolorvalueoraStringvaluenamingavalidHTMLcolorvalue.Forexample,tosettheobjectcolortored,youcouldusethehexadecimalvalue&HFF,thedecimalvalue255,orthestringvalue"red."InMicrosoftVisualBasic,youcanusetheRGBfunctiontocreateared-green-bluecolorvalue(redisRGB(255,0,0)).ThispropertyalwaysreturnsthecolorasaLongvaluerepresentingared-green-bluecolorvalue.
![Page 2062: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2062.jpg)
TotalMemberProperty
ReturnsaPivotAxisMemberobjectthatrepresentsthememberusedtodisplaysubtotals.
expression.TotalMember
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 2063: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2063.jpg)
ShowAll
![Page 2064: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2064.jpg)
TotalOrientationProperty
Returnsorsetstheorientationusedtodisplaysummarytotalswhenthereismorethanonetotal.Read/writePivotViewTotalOrientationEnum.
expression.TotalOrientation
expressionRequired.AnexpressionthatreturnsaPivotViewobject.
![Page 2065: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2065.jpg)
TotalPageMemberProperty
ReturnsaPivotPageMemberobjectthatrepresentsthememberusedtodisplaythegrandtotal.
expression.TotalPageMember
expressionRequired.AnexpressionthatreturnsaPivotPageMemberobject.
![Page 2066: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2066.jpg)
TotalRowHeightProperty
ReturnsorsetsaLongvaluethatrepresentstheheightoftherowthatcontainsthesubtotalforthespecifiedmember.Read/write.
expression.TotalRowHeight
expressionRequired.AnexpressionthatreturnsaPivotRowMemberobject.
![Page 2067: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2067.jpg)
TotalRowMemberProperty
ReturnsaPivotRowMemberobjectthatrepresentsthememberusedtodisplaythegrandtotal.
expression.TotalRowMember
expressionRequired.AnexpressionthatreturnsaPivotRowMemberobject.
![Page 2068: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2068.jpg)
TotalsProperty
PivotDataAxisandPivotResultDataAxisobjects:ReturnsaPivotTotalscollectionthatcontainsallthePivotTotalobjectsonthesummaryaxis.Thetotalsaredisplayedinthesummaryareaforeachcell.
PivotViewobject:ReturnsaPivotTotalscollectionthatcontainsallthetotalsinthecurrentview.
expression.Totals
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 2069: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2069.jpg)
ShowAll
![Page 2070: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2070.jpg)
TotalTypeProperty
Returnsorsetsthetypeoftotal.Read/writeDscTotalTypeEnum.
expression.TotalType
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 2071: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2071.jpg)
RemarksValuesotherthandscNonearevalidonlywithpagefieldsoftypedscGrouping.
![Page 2072: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2072.jpg)
ShowAll
![Page 2073: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2073.jpg)
TypeProperty
TypepropertyasitappliestotheChAxisobject.
TypepropertyasitappliestotheChChartandChSeriesobjects.
TypepropertyasitappliestotheChErrorBarsobject.
TypepropertyasitappliestotheChScalingobject.
TypepropertyasitappliestotheChTrendlineobject.
TypepropertyasitappliestothePageRelationshipobject.
TypepropertyasitappliestothePivotFieldobject.
TypepropertyasitappliestothePivotFieldSetobject.
TypepropertyasitappliestothePivotTotalobject.
TypepropertyasitappliestotheSchemaRowsourceobject.
TypepropertyasitappliestotheSectionobject.
TypepropertyasitappliestotheWorksheetobject.
TypepropertyasitappliestotheWindowobject.
![Page 2074: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2074.jpg)
ExampleThisexamplesetsthecharttypeforthespecifiedchart.
SubSetChartType()
DimchConstants
SetchConstants=ChartSpace1.Constants
ChartSpace1.Charts(0).Type=chConstants.chChartTypeLineMarkers
EndSub
![Page 2075: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2075.jpg)
ShowAll
![Page 2076: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2076.jpg)
UnderlineProperty
Returnsorsetsthefontunderlinestyleforthespecifiedrange.Read/writeUnderlineStyleEnumfortheChFontandPivotFontobjects;read/writeVariantfortheFontobject(returnsNullifthecharactersinthefontdonotallhavethesameunderlinestyle;otherwise,returnsoneoftheUnderlineStyleEnumconstants).UsetheIsNullfunctiontodeterminewhetherthereturnvalueisNull.
expression.Underline
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 2077: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2077.jpg)
ExampleThisexampleaddsasingleunderlinetoallcellvaluesinrow1.
SubFormatFont()
DimssConstants
SetssConstants=Spreadsheet1.Constants
Spreadsheet1.Rows(1).Font.Underline=ssConstants.owcUnderlineStyleSingle
EndSub
![Page 2078: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2078.jpg)
UniqueNameProperty
Returnstheuniquenameofthespecifiedobject(theuniquememberreferencereturnedbytheprovider).ReturnsNullifthemembersourceisaRecordsetDefobject.Read-onlyString.
expression.UniqueName
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 2079: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2079.jpg)
UniqueTableProperty
Specifiesthenameoftheupdatabletablewhenaformisboundtoamultitablevieworstoredprocedure.Read/writeString.
expression.UniqueTable
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 2080: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2080.jpg)
UsableHeightProperty
Returnsthemaximumheightofthespaceinpixelsthatawindowcanoccupyintheapplicationwindowarea.ReturnsthesamevalueastheHeightproperty.Read-onlyDouble.
expression.UsableHeight
expressionRequired.AnexpressionthatreturnsaWindowobject.
![Page 2081: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2081.jpg)
RemarksYoucanusetheUsableWidthpropertytoreturnthemaximumpossiblewidthforawindow.
![Page 2082: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2082.jpg)
UsableWidthProperty
Returnsthemaximumwidthofthespaceinpixelsthatawindowcanoccupyintheapplicationwindowarea.ReturnsthesamevalueastheWidthproperty.Read-onlyDouble.
expression.UsableWidth
expressionRequired.AnexpressionthatreturnsaWindowobject.
![Page 2083: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2083.jpg)
RemarksUsetheUsableHeightpropertytoreturnthemaximumpossibleheightforawindow.
![Page 2084: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2084.jpg)
UsedRangeProperty
ReturnsaRangeobjectthatrepresentstheusedrangeonthespecifiedworksheet.
expression.UsedRange
expressionRequired.AnexpressionthatreturnsaWorksheetobject.
![Page 2085: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2085.jpg)
ExampleThisexampleadjuststherowheightandcolumnwidthfortheusedrangeontheactiveworksheettofitthedatacontainedintherange.
SubAutoFitSpreadsheet()
DimrngUsedRange
'Setavariabletotheusedrangeintheactivesheet.SetrngUsedRange=Spreadsheet1.ActiveSheet.UsedRange
'Autofittherows.rngUsedRange.AutoFitRows
'Autofitthecolumns.rngUsedRange.AutoFitColumns
EndSub
![Page 2086: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2086.jpg)
UseRemoteProviderProperty
Trueifthedatasourcecontrolisusingaremoteprovider.Read/writeBoolean.
expression.UseRemoteProvider
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 2087: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2087.jpg)
RemarksWhenthispropertyissettoTrue,thedatasourcecontrolusestheMicrosoftRemoteDataServicesproviderfordataconnections.YoucanusethispropertyonlywithpagesthatarereadfromaMicrosoftInternetInformationServerusinganHTTPorHTTPSaddress.TheMicrosoftRemoteDataServicesproviderfetchesdatabypassingHTTPorHTTPSrequeststoIIS,whichthenmakesanOLEDBconnectiontothedatabase.
![Page 2088: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2088.jpg)
UserModeProperty
ReturnsaBooleanthatindicateswhetherthePivotTablelistisinview-onlymode.Read-only.
expression.UserMode
expressionRequired.AnexpressionthatreturnsaPivotTableobject.
![Page 2089: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2089.jpg)
UseStandardHeightProperty
TrueiftherowheightoftheRangeobjectequalsthestandardheightofthesheet.ReturnsNulliftherangecontainsmorethanonerowandsomeoftherowsarestandardheight.ReturnsFalsewhennoneoftherowsarethestandardheight.Read/writeVariant.
expression.UseStandardHeight
expressionRequired.AnexpressionthatreturnsaRangeobject.
![Page 2090: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2090.jpg)
ExampleThisexamplesetstheheightofrowfouronSheet1inSpreadsheet1tothestandardheight.
Spreadsheet1.Worksheets("Sheet1").Rows(4).UseStandardHeight=True
![Page 2091: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2091.jpg)
UseStandardWidthProperty
TrueifthecolumnwidthoftheRangeobjectequalsthestandardwidthofthesheet.ReturnsNulliftherangecontainsmorethanonecolumnandsomeofthecolumnsarestandardwidth.Falsewhennoneofthecolumnsarethestandardwidth.Read/writeVariant.
expression.UseStandardWidth
expressionRequired.AnexpressionthatreturnsaRangeobject.
![Page 2092: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2092.jpg)
ExampleThisexamplesetsthewidthofcolumnBonSheet1inSpreadsheet1tothestandardwidth.
Spreadsheet1.Worksheets("Sheet1").Columns("B").UseStandardWidth
![Page 2093: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2093.jpg)
UseXMLDataProperty
ReturnsorsetswhetherthedataaccesspagewillbindtoXMLdata.Read/writeBoolean.
expression.UseXMLData
expressionRequired.AnexpressionthatreturnsaDataSourceControlobject.
![Page 2094: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2094.jpg)
RemarksUsetheXMLLocationpropertytosetwhetherthedataislocatedinanXMLdataisland,oraseparateXMLdatafile.UsetheXMLDataTargetpropertytospecifythepathorIDtousewhenbindingtothedata.
![Page 2095: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2095.jpg)
ExampleThisexamplebindsthedataaccesspagetoanXMLdatafile.
SubMSODSC_BeforeInitialBind(DSCEventInfo)
DimdscConstants
SetdscConstants=MSODSC.Constants
'Settheofflinetype.MSODSC.XMLLocation=dscConstants.dscXMLDataFile
'SetthelocationoftheXMLdatatoadatafile.MSODSC.XMLDataTarget="Q1SalesAnalysis.xml"
'BindtotheXMLdata.MSODSC.UseXMLData=True
EndSub
![Page 2096: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2096.jpg)
ShowAll
![Page 2097: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2097.jpg)
ValueProperty
ValuepropertyasitappliestotheChSegmentBoundaryobject.
ValuepropertyasitappliestotheNameandSpreadsheetobjects.
ValuepropertyasitappliestotheBorders,ByRef,ParameterValue,andPivotDetailCellobjects.
ValuepropertyasitappliestotheRangeobject.
![Page 2098: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2098.jpg)
ValuepropertyasitappliestothePivotAggregate,PivotAxisMember,PivotColumnMember,PivotMember,PivotPageMember,PivotResultMemberProperty,PivotRowMember,andSchemaPropertyobjects.
![Page 2099: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2099.jpg)
ExampleThisexamplecreatesamergedcellfromthespecifiedrangeandthenplacesavalueinthemergedcell.
SubMergeCells()
Spreadsheet1.Range("A1:C3").Merge
Spreadsheet1.Range("A1").Value="Monday"
EndSub
![Page 2100: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2100.jpg)
Value2Property
ReturnsorsetsaVariantrepresentingthecellvalue.Read/write.
expression.Value2
expressionRequired.AnexpressionthatreturnsaRangeobject.
![Page 2101: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2101.jpg)
RemarksTheonlydifferencebetweenthispropertyandtheValuepropertyisthattheValue2propertydoesn’tusetheCurrencyandDatedatatypes.Youcanreturnvaluesformattedwiththesedatatypesasfloating-pointnumbersbyusingtheDoubledatatype.
![Page 2102: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2102.jpg)
ExampleThisexampleillustratesthedifferencesbetweentheValueandtheValue2properties.
SubValue_vs_Value2()DimrngCell1DimrngCell2
'Setavariabletothecellsusedinthisexample.SetrngCell1=Spreadsheet1.ActiveSheet.Range("A1")SetrngCell2=Spreadsheet1.ActiveSheet.Range("A2")
'Setthenumberformatsusedbythecellsinthisexample.rngCell1.NumberFormat="Currency"rngCell2.NumberFormat="ShortDate"
'SetthevalueofcellA1toacurrencyvalue.rngCell1.Value="$123.456789"
'SetthevalueofcellA2toadate.rngCell2.Value="9/7/1970"
'UsetheValuepropertytoreturnthevalueofcellA1.MsgBox"CurrencyreturnedbytheValueProperty="&_rngCell1.Value
'UsetheValue2propertytoreturnthevalueofcellA1.MsgBox"CurrencyreturnedbytheValue2Property="&_rngCell1.Value2
'UsetheValuepropertytoreturnthevalueofcellA2.
![Page 2103: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2103.jpg)
MsgBox"DatereturnedbytheValueProperty="&_rngCell2.Value
'UsetheValue2propertytoreturnthevalueofcellA2.MsgBox"DatereturnedbytheValue2Property="&_rngCell2.Value2EndSub
![Page 2104: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2104.jpg)
ShowAll
![Page 2105: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2105.jpg)
ValueTypeProperty
ReturnsorsetsaChartBoundaryValueTypeEnumconstantthatrepresentshowtheValuepropertyofthespecifiedsegmentboundaryisinterpreted.Read/write.
expression.ValueType
expressionRequired.AnexpressionthatreturnsaChSegmentBoundaryobject.
![Page 2106: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2106.jpg)
RemarksWhenthispropertyissettochBoundaryValuePercent,thentheValuepropertyofthespecifiedsegmentboundarymustbebetween0and1.
![Page 2107: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2107.jpg)
ExampleThisexamplebindsChartspace1totheOrderDetailstableintheSQLServerNorthwinddatabase.Then,aformatmapiscreatedthatdisplaysthelargervaluesinthechartwithadarkershadeofblue.
SubWindow_Onload()
DimserSeries1DimsegSegment1AsChSegmentDimchconstants
Setchconstants=ChartSpace1.Constants
'ThefollowingtwolinesofcodebindChartspace1totheOrderDetailstableinthe'NorthwindSQLServerdatabase.ChartSpace1.ConnectionString="Provider=SQLOLEDB.1;PersistSecurityInfo=TRUE;"&_"IntegratedSecurity=SSPI;InitialCatalog=Northwind;"&_"DataSource=DataServer;"ChartSpace1.DataMember="OrderDetails"
'ThefollowingtwolinesofcodebindChartspace1totheQuantityandProductIDfields'intheOrderDetailstable.ChartSpace1.SetDatachconstants.chDimCategories,chconstants.chDataBound,"ProductID"ChartSpace1.SetDatachconstants.chDimValues,chconstants.chDataBound,"Quantity"
'Createaformatmap.ChartSpace1.SetDatachconstants.chDimFormatValues,chconstants.chDataBound,"Quantity"
'SetavariabletothefirstseriesinthefirstchartinChartspace1.SetserSeries1=ChartSpace1.Charts(0).SeriesCollection(0)
![Page 2108: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2108.jpg)
'Addasegmenttotheformatmap.SetsegSegment1=serSeries1.FormatMap.Segments.Add
'Measurethesegmentboundariesbaseduponapercentage.segSegment1.Begin.ValueType=chconstants.chBoundaryValuePercentsegSegment1.End.ValueType=chconstants.chBoundaryValuePercent
'Setthebeginningvalueto0%,andtheendingvalueto100%.segSegment1.Begin.Value=0segSegment1.End.Value=1
'Formattheinteriorofthematchingvalues.segSegment1.Begin.Interior.Color="White"segSegment1.End.Interior.Color="Blue"
EndSub
![Page 2109: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2109.jpg)
VersionProperty
ReturnstheMicrosoftOfficeWebComponentsversion.Read-onlyString.
expression.Version
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 2110: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2110.jpg)
ShowAll
![Page 2111: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2111.jpg)
VerticalAlignmentProperty
Returnsorsetstheverticalalignmentofthespecifiedobject.CanbeanXlVAlignconstant.Read/writeVariant.
expression.VerticalAlignment
expressionRequired.AnexpressionthatreturnsaRangeobject.
![Page 2112: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2112.jpg)
ExampleThisexampletop-alignsthecontentsofcellsC7:G10onSheet1inSpreadsheet1.
SubSetAlignment()DimrngAlignDimssConstants
SetssConstants=Spreadsheet1.Constants
SetrngAlign=Spreadsheet1.Worksheets("Sheet1").Range("C7:G10")
'Centerthecontentsoftherangehorizontally.rngAlign.HorizontalAlignment=ssConstants.xlHAlignCenter
'Verticallyalignthecontentsoftherangeatthetopofthecells.rngAlign.VerticalAlignment=ssConstants.xlVAlignTopEndSub
![Page 2113: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2113.jpg)
VerticalExtentProperty
YouusetheVerticalExtentpropertytospecifyordeterminetheextentoftheverticalviewoftheChScrollViewobject.ReturnsaLong.Read/writeLong.
expression.VerticalExtent
expressionRequired.AnexpressionthatreturnsaChScrollViewobject.
![Page 2114: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2114.jpg)
Remarks
YouusemethodsandpropertiesoftheChScrollViewobjecttoretrieveinformationaboutandcontroltheviewofachart.TheportionoftheChartcomponentthatdisplaysthechartitselfisthevisibleplotareaanditcandisplaytheentirechartoraportionofthechart.Whenonlyaportionofthechartisdisplayedinthevisibleplotarea,theeffectisasifyouhavezoomedinonthatportionofthechartandtheremainderofthechartiscontainedwithinavirtualplotareathatextendsbeyondtheboundaryofthevisibleplotarea.ForinformationonhowthevaluesofthepropertiesoftheChScrollViewobjectrelatetoeachother,seetheChScrollViewobjecttopic.
![Page 2115: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2115.jpg)
ExampleThefollowingexampleusestheVerticalExtentMaxpropertytotoggleachartviewbetweenazoomedandunzoomed.
SubToggleZoom()IfobjChart.ChScrollView.VerticalExtent=objChart.ChScrollView.VerticalExtentMaxThen'Zoomchartandmakeitscrollable.objChart.ChScrollView.VerticalExtent=(objChart.ChScrollView.VerticalExtentMax/2)objChart.ChScrollView.HorizontalExtent=(objChart.ChScrollView.HorizontalExtentMax/2)Else'Unzoomchartandremovescrolling.objChart.ChScrollView.VerticalExtent=objChart.ChScrollView.VerticalExtentMaxobjChart.ChScrollView.HorizontalExtent=objChart.ChScrollView.HorizontalExtentMaxEndIfEndSub
![Page 2116: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2116.jpg)
VerticalExtentMaxProperty
YouusetheVerticalExtentMaxpropertytospecifyordeterminethemaximumextentoftheverticalviewoftheChScrollViewobject.ReturnsaLong.Read/writeLong.
expression.VerticalExtentMax
expressionRequired.AnexpressionthatreturnsaChScrollViewobject.
![Page 2117: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2117.jpg)
Remarks
YouusemethodsandpropertiesoftheChScrollViewobjecttoretrieveinformationaboutandcontroltheviewofachart.TheportionoftheChartcomponentthatdisplaysthechartitselfisthevisibleplotareaanditcandisplaytheentirechartoraportionofthechart.Whenonlyaportionofthechartisdisplayedinthevisibleplotarea,theeffectisasifyouhavezoomedinonthatportionofthechartandtheremainderofthechartiscontainedwithinavirtualplotareathatextendsbeyondtheboundaryofthevisibleplotarea.TheVerticalExtentMaxpropertyrepresentsthetotalheightofachartwhetherthatchartiszoomedornot.ForinformationonhowthevaluesofthepropertiesoftheChScrollViewobjectrelatetoeachother,seetheChScrollViewobjecttopic.
![Page 2118: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2118.jpg)
ExampleThefollowingexampleusestheVerticalExtentMaxpropertytotoggleachartviewbetweenazoomedandunzoomed:
SubToggleZoom()IfobjChart.ChScrollView.VerticalExtent=objChart.ChScrollView.VerticalExtentMax'Zoomchart.objChart.ChScrollView.VerticalExtent=(objChart.ChScrollView.objChart.ChScrollView.HorizontalExtent=(objChart.ChScrollView.HorizontalExtentMax/2)Else'Unzoomchart.objChart.ChScrollView.VerticalExtent=objChart.ChScrollView.objChart.ChScrollView.HorizontalExtent=objChart.ChScrollView.HorizontalExtentMaxEndIfEndSub
![Page 2119: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2119.jpg)
VerticalPositionProperty
YouusetheVerticalPositionpropertytospecifyordeterminethecurrentverticalviewpositionoftheChScrollViewobject.ReturnsaLong.Read/writeLong.
expression.VerticalPosition
expressionRequired.AnexpressionthatreturnsaChScrollViewobject.
![Page 2120: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2120.jpg)
Remarks
YouusemethodsandpropertiesoftheChScrollViewobjecttoretrieveinformationaboutandcontroltheviewofachart.TheportionoftheChartcomponentthatdisplaysthechartitselfisthevisibleplotareaanditcandisplaytheentirechartoraportionofthechart.Whenonlyaportionofthechartisdisplayedinthevisibleplotarea,theeffectisasifyouhavezoomedinonthatportionofthechartandtheremainderofthechartiscontainedwithinavirtualplotareathatextendsbeyondtheboundaryofthevisibleplotarea.ForinformationonhowthevaluesofthepropertiesoftheChScrollViewobjectrelatetoeachother,seetheChScrollViewobjecttopic.
WhentheVerticalPositionpropertyequalszero,thetopoftheplotareawillbeatthetopofthescrollviewwindow.TheVerticalPositionpropertycanbeanegativenumber.ForexampleifVerticalPosition=(-0.25*VerticalExtentMax),theplotareawillbepusheddownby25%ofthevirtualheightoftheplotarea.
![Page 2121: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2121.jpg)
ExampleThefollowingcodeshowsdifferentwaysofworkingwiththepropertiesandmethodsoftheChScrollViewobject.
DimlngVPDimlngHPDimlngVEDimlngHEDimlngVEMDimlngHEMDimobjScrollView
SetobjScrollView=ChartSpace1.Charts(0).ScrollViewlngVP=objScrollView.VerticalPositionlngHP=objScrollView.HorizontalPositionlngVE=objScrollView.VerticalExtentlngHE=objScrollView.HorizontalExtentlngVEM=objScrollView.VerticalExtentMaxlngHEM=objScrollView.HorizontalExtentMax
'Togglethescrollviewbetweenunzoomedand200%zoomed:IflngVE=lngVEMAndlngHE=lngHEMThen'Chartisnotzoomedsozoomto200%.objScrollView.VerticalExtentMax=objScrollView.VerticalExtentMax*2objScrollView.HorizontalExtentMax=objScrollView.HorizontalExtentMax*2Else'Chartiszoomed,returnittounzoomedstate.objScrollView.VerticalExtentMax=objScrollView.VerticalExtentobjScrollView.HorizontalExtentMax=objScrollView.HorizontalExtentEndIf
![Page 2122: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2122.jpg)
'Forzoomedchart,displaylowerleftcornerofvirtualplotareain'thelowerleftcornerofthevisibleplotarea.IflngVE<>lngVEMOrlngHE<>lngHEMThen'Movebottomedgeofvirtualplotareatobottomofvisibleplotarea.objScrollView.VerticalPosition=objScrollView.VerticalPosition+(lngVEM-lngVM)'Moveleftedgeofvirtualplotareatoleftedgeofvisilbleplotarea.objScrollView.HorizontalPosition=0EndIf
'ThisexampledoesthesamethingasthepreviousexampleusingtheSetPositionmethod.IflngVE<>lngVEMOrlngHE<>lngHEMThenobjScrollView.SetPosition0,objScrollView.VerticalPosition+(lngVEM-lngVE)EndIf
![Page 2123: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2123.jpg)
ViewProperty
ReturnsaPivotViewobjectthatrepresentsthecurrentviewforthespecifiedobject.
expression.View
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 2124: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2124.jpg)
ViewableRangeProperty
Returnsorsetstherangeofcellsthattheusercanview.Thismakesitpossibletohideworksheetcells(thatcontainintermediatecalculations,forexample).Read/writeString.
expression.ViewableRange
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 2125: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2125.jpg)
RemarksDonotconfusethispropertywiththeVisibleRangeproperty,whichreturnsaRangeobjectthatrepresentsallthecellsthatarecurrentlyvisible.
![Page 2126: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2126.jpg)
ExampleThisexamplesetstheviewablerangeonthespreadsheet.
SubShrink_Viewable_Range()
'SettheviewablerangeofthewindowtocellsA1:D10.Spreadsheet1.ActiveWindow.ViewableRange="A1:D10"'Resizethespreadsheettoeliminatethegrayarea.Spreadsheet1.Autofit=TrueEndSub
![Page 2127: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2127.jpg)
ViewOnlyModeProperty
TrueiftheMicrosoftOfficeWebComponentsareinview-onlymode.TheWebComponentswillbeinview-onlymodeiftheuserdoesnothavetheappropriatelicenseinstalledontheircomputer.Read-onlyBoolean.
expression.ViewOnlyMode
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 2128: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2128.jpg)
ViewportLeftProperty
ReturnsorsetsaLongvaluethatrepresentstheleftsideoftheviewabledatarange.Usethispropertytoscrollthatdataareatotheleftbyaspecificnumberofpixels.Read/write.
expression.ViewportLeft
expressionRequired.AnexpressionthatreturnsaPivotDataobject.
![Page 2129: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2129.jpg)
RemarksUsetheViewportToppropertytoreturnorsetthetopoftheviewabledatarange.
Settingthispropertytoaninvalidvaluewillresultinarun-timeerror.Forexample,settingthispropertyto5000whenthedatarangecannotbescrolledbythatmanypixelswillresultinarun-timeerror.
![Page 2130: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2130.jpg)
ViewportTopProperty
ReturnsorsetsaLongvaluethatrepresentsthetopoftheviewabledatarange.Usethispropertytoscrollthatdataareadownbyaspecificnumberofpixels.Read/write.
expression.ViewportTop
expressionRequired.AnexpressionthatreturnsaPivotDataobject.
![Page 2131: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2131.jpg)
RemarksUsetheViewportLeftpropertytoreturnorsettheleftsideoftheviewabledatarange.
Settingthispropertytoaninvalidvaluewillresultinarun-timeerror.Forexample,settingthispropertyto5000whenthedatarangecannotbescrolledbythatmanypixelswillresultinarun-timeerror.
![Page 2132: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2132.jpg)
ShowAll
![Page 2133: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2133.jpg)
VisibleProperty
ChDataLabel,ChLegendEntry,PivotLabel,andTitleBarobjects:ReturnsorsetsaBooleanthatdetermineswhetherthespecifiedobjectisvisible.SetthispropertytoFalsetohidethespecifiedobject.Read/write.
SheetsandWorksheetsobjects:ReturnsorsetsaVariantthatdetermineswhetherthespecifiedobjectisvisible.SetthispropertytoFalsetohidethespecifiedobject.Read/write.
Windowobject.ReturnsaBooleanthatindicateswhetherthespecifiedwindowisvisible.Read-only.
Worksheetobject.ReturnsorsetsaXlSheetVisibilityconstantthatdeterminesthevisibilityofthespecifiedworksheet.Read/write.
expression.Visible
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 2134: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2134.jpg)
ExampleThisexampledisplaysthelegendforthespecifiedchartandhidesthespecifiedlegendentry.
SubShowLegend()
ChartSpace1.Charts(0).HasLegend=TrueChartSpace1.Charts(0).Legend.LegendEntries(1).Visible=False
EndSub
![Page 2135: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2135.jpg)
VisibleRangeProperty
ReturnsaRangeobjectthatrepresentsallthecellsthatarecurrentlyvisible.Read-only.
expression.VisibleRange
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 2136: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2136.jpg)
RemarksDonotconfusethispropertywiththeViewableRangeproperty,whichreturnsaStringthatspecifiestherangethattheusercanview(partofthatrangemaynotbecurrentlyvisible).
![Page 2137: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2137.jpg)
ExampleThisexamplesetsthefonttoboldineveryothercolumninthevisiblerangeontheactiveworksheet.
SubBold_Odd_Columns()DimrngColumn'Loopthroughthevisiblecolumns.ForEachrngColumnInSpreadsheet1.ActiveWindow.VisibleRange.Columns'Setthefonttoboldifthecolumnisodd-numbered.IfrngColumn.ColumnMod2=0ThenrngColumn.Font.Bold=TrueEndIfNextEndSub
ThefunctioninthisexamplereturnsTrueiftheentirecurrentregionforcellA1isvisible(ifthecurrentregionextendsoutsidethevisiblerange,thefunctionreturnsFalse).
FunctionIsCurrentRegionVisible()DimrngCurrentDimrngVisibleDimrngIntersect
'SetthevaribletothecurrentregionofcellA1.SetrngCurrent=Spreadsheet1.ActiveSheet.Cells(1,1).CurrentRegion'Setavariabletothecurrentlyvisiblerange.SetrngVisible=Spreadsheet1.ActiveWindow.VisibleRange
![Page 2138: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2138.jpg)
'Setavariabletotheoverlappingportionofthecurrentregion'andthevisiblerange.SetrngIntersect=Spreadsheet1.RectIntersect(rngCurrent,rngVisible)'Iftheoverlappingregionisthesameasthecurrentragion,then'returntrue.IsCurrentRegionVisible=(rngIntersect.Address=rngCurrent.Address)EndFunction
![Page 2139: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2139.jpg)
WatermarkBorderProperty
ReturnsaChBorderobjectthatrepresentstheborderofthewatermarkinthespecifieddropzone.UsethepropertiesofthereturnedChBorderobjecttoformattheborderofthedropzone'swatermark.
expression.WatermarkBorder
expressionRequired.AnexpressionthatreturnsaChDropZoneobject.
![Page 2140: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2140.jpg)
ExampleThisexampleformatsthebuttonandthewatermarkoftheseriesdropzoneinChartspace1.
SubSetupDropZone()
DimdzSeriesDropZoneDimChConstants
SetchConstants=Chartspace1.Constants
'SetavariabletotheseriesdropzoneinChartspace1.SetdzSeriesDropZone=ChartSpace1.DropZones(chConstants.chDropZoneSeries)
'Thenextthreelinesofcodeformatthebuttonofthedropzone.dzSeriesDropZone.ButtonBorder.Weight=chConstants.owcLineWeightMediumdzSeriesDropZone.ButtonInterior.SetSolid"Red"dzSeriesDropZone.ButtonFont.Size=14
'Thenextthreelinesofcodeformatthewatermarkofthedropzone.dzSeriesDropZone.WatermarkBorder.Color="Red"dzSeriesDropZone.WatermarkFont.Color="Red"dzSeriesDropZone.WatermarkInterior.SetSolid"Green"
EndSub
![Page 2141: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2141.jpg)
WatermarkFontProperty
ReturnsaChFontobjectthatrepresentsthefontofthewatermarkinthespecifieddropzone.UsethepropertiesofthereturnedChFontobjecttoformatthefontofthedropzone'swatermark.
expression.WatermarkFont
expressionRequired.AnexpressionthatreturnsaChDropZoneobject.
![Page 2142: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2142.jpg)
ExampleThisexampleformatsthebuttonandthewatermarkoftheseriesdropzoneinChartspace1.
SubSetupDropZone()
DimdzSeriesDropZoneDimChConstants
SetchConstants=Chartspace1.Constants
'SetavariabletotheseriesdropzoneinChartspace1.SetdzSeriesDropZone=ChartSpace1.DropZones(chConstants.chDropZoneSeries)
'Thenextthreelinesofcodeformatthebuttonofthedropzone.dzSeriesDropZone.ButtonBorder.Weight=chConstants.owcLineWeightMediumdzSeriesDropZone.ButtonInterior.SetSolid"Red"dzSeriesDropZone.ButtonFont.Size=14
'Thenextthreelinesofcodeformatthewatermarkofthedropzone.dzSeriesDropZone.WatermarkBorder.Color="Red"dzSeriesDropZone.WatermarkFont.Color="Red"dzSeriesDropZone.WatermarkInterior.SetSolid"Green"
EndSub
![Page 2143: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2143.jpg)
WatermarkInteriorProperty
ReturnsaChInteriorobjectthatrepresentstheinteriorofthewatermarkinthespecifieddropzone.UsethepropertiesofthereturnedChInteriorobjecttoformattheinteriorofthedropzone'swatermark.
expression.WatermarkInterior
expressionRequired.AnexpressionthatreturnsaChDropZoneobject.
![Page 2144: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2144.jpg)
ExampleThisexampleformatsthebuttonandthewatermarkoftheseriesdropzoneinChartspace1.
SubSetupDropZone()
DimdzSeriesDropZoneDimChConstants
SetchConstants=Chartspace1.Constants
'SetavariabletotheseriesdropzoneinChartspace1.SetdzSeriesDropZone=ChartSpace1.DropZones(chConstants.chDropZoneSeries)
'Thenextthreelinesofcodeformatthebuttonofthedropzone.dzSeriesDropZone.ButtonBorder.Weight=chConstants.owcLineWeightMediumdzSeriesDropZone.ButtonInterior.SetSolid"Red"dzSeriesDropZone.ButtonFont.Size=14
'Thenextthreelinesofcodeformatthewatermarkofthedropzone.dzSeriesDropZone.WatermarkBorder.Color="Red"dzSeriesDropZone.WatermarkFont.Color="Red"dzSeriesDropZone.WatermarkInterior.SetSolid"Green"
EndSub
![Page 2145: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2145.jpg)
WeightProperty
Returnsorsetstheweightforthespecifiedborderorline.CanbeoneoftheLineWeightEnumconstants,orcanbeNullifthebordersarenotallthesameweight.Read/writeVariant.
expression.Weight
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 2146: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2146.jpg)
ExampleThisexamplesetstheaxislineandborderweightofthecharttothick.
SubFormatChart()
DimchConstants
SetchConstants=ChartSpace1.Constants
ChartSpace1.Charts(0).Axes(chConstants.chAxisPositionValue).Line_.Weight=chConstants.owcLineWeightThick
ChartSpace1.Border.Weight=chConstants.owcLineWeightThick
EndSub
![Page 2147: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2147.jpg)
ShowAll
![Page 2148: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2148.jpg)
WidthProperty
WidthpropertyasitappliestotheWindowobject.
WidthpropertyasitappliestothePivotAxisMember,PivotColumnMember,PivotFieldSet,PivotPageMember,PivotRowMember,PivotTable,andPivotTotalobjects.
WidthpropertyasitappliestothePivotAggregate,PivotDetailCell,PivotResultAxis,PivotResultColumnAxis,PivotResultDataAxis,PivotResultFilterAxis,PivotResultGroupAxis,PivotResultLabel,PivotResultPageAxis,andPivotResultRowAxisobjects.
WidthpropertyasitappliestotheRangeobject.
![Page 2149: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2149.jpg)
RemarksTheAutoFitpropertyofthePivotTablelistissettoFalsewhenthevalueoftheWidthpropertyischanged.
![Page 2150: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2150.jpg)
ExampleThisexamplesetsthewidthofthePivotTablelistto150points.
PivotTable1.Object.Width=150
![Page 2151: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2151.jpg)
WidthRatioProperty
Returnsorsetsthewidthratioforthespecifiedchartinrelationtotheotherchartsinthechartworkspace.Thedefaultvalueis100.Read/writeLong.
expression.WidthRatio
expressionRequired.AnexpressionthatreturnsaChChartobject.
![Page 2152: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2152.jpg)
RemarksForthispropertytohaveanyeffect,youmusthavemorethanonechartinthechartworkspace.Whenmorethanonechartisdisplayed,thechartsaredisplayedinagrid(formoreinformation,seetheHelptopicsfortheChartLayoutandChartWrapCountproperties).Initially,theHeightRatioandWidthRatiopropertiesaresetto100forallchartsinthegrid,andallchartsarethesamesize.
Tochangethewidthofchartsinthegrid,adjusttheWidthRatiopropertysettings.Forexample,ifeachchartisdisplayedinthreecolumnsallchartshaveaninitialWidthRatiosettingof100.Ifyouwantcolumn3tobeonlyhalftheavailablecolumnwidth,setitsWidthRatiosettingto200;theremaininghalfofthechartwidthwillbedividedbetweencolumns1and2.BecausethewidthspecifiedbytheWidthRatiopropertyisrelative,youcansetthispropertyforthethreecolumnsto1,1,2;100,100,200;or20,20,40.allofwhichhavethesameeffect.
Ifthechartworkspacecontainschartsdisplayedinmorethanonecolumn,thelargestWidthRatiosettingineachcolumnisusedtosettherelativewidthfortheentirecolumn.
Thispropertyisusefulforcreatingpriceandvolumestockchartsinwhichthevolumechartishalfthesizeofthepricechart.
![Page 2153: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2153.jpg)
WindowNumberProperty
Returnsthewindownumber.Alwaysreturns1inthisversionoftheMicrosoftOfficeSpreadsheetComponent.Read-onlyLong.
expression.WindowNumber
expressionRequired.AnexpressionthatreturnsaWindowobject.
![Page 2154: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2154.jpg)
WindowsProperty
ReturnsaWindowscollectionthatrepresentsthewindowsintheopenworkbook.
expression.Windows
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 2155: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2155.jpg)
RemarksAlthougheachworksheetintheopenworkbookhasitsownwindow,thispropertyalwaysreturnsareferencetotheactiveworksheet'swindow.
![Page 2156: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2156.jpg)
WorkbooksProperty
ReturnsaWorkbookscollectionthatrepresentstheopenworkbook.
expression.Workbooks
expressionRequired.AnexpressionthatreturnsaSpreadsheetobject.
![Page 2157: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2157.jpg)
WorksheetProperty
ReturnsaWorksheetobjectthatrepresentstheworksheetcontainingthespecifiedrange.Read-only.
expression.Worksheet
expressionRequired.AnexpressionthatreturnsaRangeobject.
![Page 2158: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2158.jpg)
ExampleThisexampleactivatestheworksheetinSpreadsheet1thatcontainstherangenamed"Revenue."
Spreadsheet1.Range("Revenue").Worksheet.Activate
![Page 2159: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2159.jpg)
WorksheetsProperty
ReturnsaWorksheetscollectionthatrepresentstheworksheetsintheopenworkbook.
expression.Worksheets
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 2160: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2160.jpg)
XMLDataProperty
ReturnsorsetstheXMLdataforthespecifiedcomponent.Read/writeString.
expression.XMLData
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 2161: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2161.jpg)
XmlDataBindingsProperty
YouusetheXmlDataBindingspropertytoreturnanXmlDataBindingscollection.Read-onlyXmlDataBindingscollection.
expression.XmlDataBindings
expressionRequired.AnexpressionthatreturnsaWorkbookobject.
![Page 2162: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2162.jpg)
Remarks
TheXmlDataBindingscollectioncontainsoneormoreXmlDataBindingobjects.EachXmlDataBindingobjectcontainsconfigurationdatathatbindstheSpreadsheetcomponenttoadataretrievalservice,aSOAPWebService,anXMLfile,oranotherSpreadsheetcomponent.
![Page 2163: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2163.jpg)
ExampleThefollowingexampleusestheXmlDataBindingspropertyoftheWorkbookobjecttoreturnamemberoftheXmlDataBindingscollectionandthenworkwiththeXMLthatrepresentsthebindinginformation:
DimobjBindingsDimobjBindingDimstrBindingInfo
SetobjBindings=Spreadsheet1.ActiveWorkbook.XmlDataBindings
ForEachobjBindinginobjBindings'SavetheXMLbindinginformationtoavariable.strBindingInfo=objBinding.BindingData'Workwithbindinginformationhere.Next
![Page 2164: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2164.jpg)
XMLDataTargetProperty
ReturnsorsetsaStringthatrepresentsthelocationoftheXMLdatatoloadorsave.Read/write.
expression.XMLDataTarget
expressionRequired.AnexpressionthatreturnsaDataSourceControlobject.
![Page 2165: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2165.jpg)
ExampleThisexampleexportsthecurrentdatainthedatasourcecontrolnamedMSODSCtoanXMLdatafile.
SubExportData()
DimdscConstants
SetdscConstants=MSODSC.Constants
'SetthelocationoftheXMLdatatoadatafile.MSODSC.XMLLocation=dscConstants.dscXMLDataFile
'Setthespecifictargettoexportto.MSODSC.XMLDataTarget="Q1SalesAnalysis.xml"
'Exportthecurrentdata.MSODSC.ExportXMLEndSub
![Page 2166: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2166.jpg)
ShowAll
![Page 2167: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2167.jpg)
XMLLocationProperty
ReturnsorsetsaDscXMLLocationEnumconstantthatspecifieswhethertheXMLdataistobeloadedorsavedfromanXMLdatafileoranXMLdataislandinsideofthecurrentdataaccesspage.Read/write.
expression.XMLLocation
expressionRequired.AnexpressionthatreturnsaDataSourceControlobject.
![Page 2168: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2168.jpg)
ExampleThisexampleexportsthecurrentdatainthedatasourcecontrolnamedMSODSCtoanXMLdatafile.
SubExportData()
DimdscConstants
SetdscConstants=MSODSC.Constants
'SetthelocationoftheXMLdatatoadatafile.MSODSC.XMLLocation=dscConstants.dscXMLDataFile
'Setthespecifictargettoexportto.MSODSC.XMLDataTarget="Q1SalesAnalysis.xml"
'Exportthecurrentdata.MSODSC.ExportXML
EndSub
![Page 2169: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2169.jpg)
XmlMapProperty
YouusetheXmlMappropertytoreturnanXmlMapobjectrepresentingtheXMLschemamapassociatedwithanXmlDataBindingobject.ReturnsanXmlMapobject.Read-only.
expression.XmlMap
expressionRequired.AnexpressionthatreturnsanXmlDataBindingobject.
![Page 2170: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2170.jpg)
Remarks
YoucanusetheMapDatapropertyoftheXmlMapobjecttospecifyordeterminethemappinginformationforthedatasourcespecifiedintheXmlDataBindingobject.
![Page 2171: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2171.jpg)
ExampleThefollowingexampleusestheXmlMappropertytoreturntheschemamapassociatedwithabinding.
DimobjBindingsDimobjBindingDimstrMapInfo
SetobjBindings=Spreadsheet1.ActiveWorkbook.XmlDataBindings
ForEachobjBindinginobjBindings'SavetheXMLbindinginformationtoavariable.SetstrMapInfo=objBinding.XmlMap'Workwithbindinginformationhere.Next
![Page 2172: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2172.jpg)
XmlMapsProperty
YouusetheXmlMapspropertyoftheWorkbookobjecttoreturnanXmlMapscollection.ReturnsanXmlMapscollection.Read-only.
expression.XmlMaps
expressionRequired.AnexpressionthatreturnsaWorkbookobject.
![Page 2173: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2173.jpg)
Remarks
TheXmlMapsobjectisacollectionofalloftheXmlMapobjectsassociatedwithaSpreadsheetcomponent.AnXmlMapisanXMLschemamapthatspecifieshowtomapdatafromadatasourceintheSpreadsheetcomponent.
YoucancreateanewXmlMapobjectbyusingtheAddmethodoftheXmlMapscollection.TheXmlMapobjectisalsoavailablewhenyousettheXmlUrlpropertyofaSpreadsheetcomponenttothenameofanXMLSpreadsheetfile,orastringcontainingproperlyconfiguredXMLdata,thatcontainsthebindingandmappingconfigurationfortheSpreadsheetcomponent.YoucancreateanXMLSpreadsheetfilebycreatingadataboundspreadsheetusingMicrosoftExcelandthensavingtheworkbookasanXMLSpreadsheet.
![Page 2174: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2174.jpg)
ExampleThefollowingexampleillustrateshowtousetheXmlMapspropertyoftheWorkBookobjecttoreturnanXmlMapscollection.
DimobjMapsDimobjMapDimstrMapInfo
SetobjMaps=Spreadsheet1.ActiveWorkbook.XmlMaps
ForEachobjMapinobjMaps'SavetheXMLmapinformationtoavariable.strMapInfo=objMap.MapData'Workwithmapinformationhere.Next
![Page 2175: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2175.jpg)
XMLURLProperty
ReturnsorsetsaStringrepresentingtheURLtoanExtensibleMarkupLanguage(XML)file.Settingthispropertydiscardsthecurrently-openworkbookandloadsthespecifiedXMLfileintoanewworkbook.Read/write.
expression.XMLURL
expressionRequired.AnexpressionthatreturnsaSpreadsheetobject.
![Page 2176: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2176.jpg)
ExampleThisexampleloadsthecontentsofthespecifiedXMLfileintoSheet1ofSpreadsheet1.
Spreadsheet1.XMLURL="http://example.microsoft.com/Test.xml"
![Page 2177: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2177.jpg)
ZOrderProperty
ReturnsorsetsaLongthatspecifiesthetheorderinwhichaseriesisrenderedfromfronttoback.Read/write.
expression.ZOrder
expressionRequired.AnexpressionthatreturnsaChSeriesobject.
![Page 2178: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2178.jpg)
RemarksSetthispropertyto0torendertheseriesatthefrontofthechart.
Thispropertyaffectsonlyclusteredoroverlapping3-DArea,Bar,Column,andLinecharts.
![Page 2179: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2179.jpg)
AfterDeleteEvent
Occursafterarecordhasbeendeleted,orthedeletionofarecordhasbeencanceled.Usethiseventisyouwanttoperformasetofactionswhenarecordisdeleted.
PrivateSubObject_AfterDelete(ByValDSCEventInfoAsDSCEventInfo)
ObjectADataSourceControlobject.
DSCEventInfoTheDSCEventInfoobjectthatcontainsinformationabouttheevent.
![Page 2180: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2180.jpg)
RemarksUsetheStatuspropertyoftheDSCEventInfoobjecttodeterminewhethertherecorddeletionwascanceled.
UsetheDataPageandSectionpropertiesoftheDSCEventInfoobjecttodeterminethedataaccesspage,section,andrecordsetthatwasupdated.
![Page 2181: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2181.jpg)
ExampleThisexampledisplaysamessageboxthatindicatesthestatusoftherecorddeletionthatfiredtheevent.
SubMSODSC_AfterDelete(DSCEventInfo)
DimdscConstants
SetdscConstants=MSODSC.Constants
'Checkthestatusoftherecorddeletion.SelectCaseDSCEventInfo.Status
'Therecordwasdeleted.CasedscConstants.dscDeleteOK
MsgBox"Recorddeletedsuccessfully."
'Thedeletionwascanceledviacode.CasedscConstants.dscDeleteCancel
MsgBox"Recorddeletioncanceledbycode."
'Thedelectionwascanceledbytheuser.CasedscConstants.dscDeleteUserCancelMsgBox"Recorddeletioncanceledbyuser."
EndSelect
EndSub
![Page 2182: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2182.jpg)
AfterFinalRenderEvent
Occursafterallchartelementshavebeenrendered.
PrivateSubChartSpace_AfterFinalRender(ByValdrawObjectAsChChartDraw)
drawObjectAChChartDrawobject.Usethemethodsandpropertiesofthisobjecttodrawobjectsonthechart.
![Page 2183: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2183.jpg)
RemarksYoumustsettheAllowRenderEventspropertytoTrueinordertousethisevent.
![Page 2184: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2184.jpg)
AfterInsertEvent
Occursafterarecordhasbeeninserted.Usethiseventifyouwanttoperformasetofactionswhenarecordisinserted.
PrivateSubObject_AfterInsert(ByValDSCEventInfoAsDSCEventInfo)
ObjectADataSourceControlobject.
DSCEventInfoTheDSCEventInfoobjectthatcontainsinformationabouttheevent.
![Page 2185: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2185.jpg)
RemarksUsetheDataPageandSectionpropertiesoftheDSCEventInfoobjecttodeterminethedataaccesspage,section,andrecordsetthatwasupdated.
![Page 2186: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2186.jpg)
AfterLayoutEvent
Occursafterallchartsinthespecifiedchartcontrolhavebeenlaidout,butbeforetheyhavebeenrendered.Duringthisevent,youcanrepositiontheChTitle,ChLegend,ChChart,andChAxisobjectsofeachchartbychangingtheirLeftandTopproperties.YoucanrepositiontheChPlotAreaobjectbychangingitsLeft,Top,Right,andBottomproperties.Thesepropertiescannotbechangedoutsideofthisevent.
PrivateSubChartSpace_AfterLayout(ByValdrawObjectAsChChartDraw)
drawObjectAChChartDrawobject.Usethemethodsandpropertiesofthisobjecttomanipulatedrawingobjectsonthechart.
![Page 2187: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2187.jpg)
RemarksTheAllowLayoutEventspropertymustbesettoTrueinordertocapturethisevent.
![Page 2188: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2188.jpg)
ExampleThisexampleusestheAfterLayouteventtomovethetitleforthefirstchartinChartspace1totheleftsideofthechart.Itthenmovesthelegendtowardsthetopofthechart.
PrivateSubChartSpace1_AfterLayout(drawObject)
'Movethetitletotheleftsideofthechart.ChartSpace1.Charts(0).Title.Left=1
'Movethelegendtowardsthetopofthechart.ChartSpace1.Charts(0).Legend.Top=20
EndSub
![Page 2189: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2189.jpg)
AfterRenderEvent
OccursaftertheobjectrepresentedbythechartObjectargumenthasbeenrendered.
PrivateSubChartSpace_AfterRender(ByValdrawObjectAsChChartDraw,ByValchartObjectAsObject)
drawObjectAChChartDrawobject.Usethemethodsandpropertiesofthisobjecttomanipulatedrawingobjectsonthechart.
chartObjectTheobjectthathasjustbeenrendered.UsetheTypeNamefunctiontodeterminewhattypeofobjecthasjustbeenrendered.
![Page 2190: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2190.jpg)
RemarksYoumustsettheAllowRenderEventsandAllowPointsRenderEventspropertiestoTrueinordertousethiseventwithallchartobjects.
![Page 2191: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2191.jpg)
ExampleThisexampleaddsatextstringtotheupper-leftcorneroftheplotareaeachtimethatthechartisredrawn.
SubChartSpace1_AfterRender(drawObject,chartObject)
DimchChart1
SetchChart1=ChartSpace1.Charts(0)'Afterthelegendhasbeenrendered,thenaddthetext'tothechart.IfTypeName(chartObject)="ChLegend"ThendrawObject.DrawText"2000Sales",chChart1.PlotArea.Left+5,_chChart1.PlotArea.Top
EndIf
EndSub
ThisexampleillustrateshowyoucanusetheBeforeRenderandAfterRendereventstogethertocreatecustomgridlines.TheBeforeRendereventcancelstherenderingofthegridlinesandtheAfterRendereventdrawscustomgridlines.
SubChartSpace1_BeforeRender(drawObject,chartObject,Cancel)
'Checktoseeifthenextobjecttoberendered'isagridline.IfTypeName(chartObject)="ChGridlines"Then
'Canceltherenderingofgridlines.
![Page 2192: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2192.jpg)
Cancel.Value=True
EndIf
EndSub
SubChartSpace1_AfterRender(drawObject,chartObject)
DimchChart1DimplPlotAreaDimlLeftDimlRightDimlHeightDimlTopDimlIncrementDimchConstantsDimiCtr
SetchConstants=ChartSpace1.Constants
'SetavariabletothefirstchartinChartspace1.SetchChart1=ChartSpace1.Charts(0)
'Setavariabletotheplotareaofthechart.SetplPlotArea=chChart1.PlotArea
'Checktoseeiftherenderedobjectisagridline.IfTypeName(chartObject)="ChGridlines"Then
'Thenextfourlinesofcodeusetheextentsof'theplotareatocalculatethedimensionsoftheline'tobedrawn.lLeft=plPlotArea.Left
![Page 2193: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2193.jpg)
lTop=plPlotArea.ToplRight=plPlotArea.RightlHeight=plPlotArea.Bottom-lTop
'Determinetheincrementtousebetweengridlines.'Changethedivisortoadjusttheincrement.lIncrement=lHeight/10
'Thenextthreelinesofcodesetthepropertiesofthe'linetobedrawn.drawObject.Line.DashStyle=chConstants.chLineRoundDotdrawObject.Line.Color="Green"drawObject.Line.Weight=chConstants.owcLineWeightMedium
ForiCtr=1To9
'Drawtheline.drawObject.DrawLinelLeft,lTop+iCtr*lIncrement,_lRight,lTop+iCtr*lIncrement
NextEndIf
EndSub
![Page 2194: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2194.jpg)
AfterUpdateEvent
Occursafterarecordisupdatedwithnewdataortherecordlosesfocus.
PrivateSubObject_AfterUpdate(ByValDSCEventInfoAsDSCEventInfo)
ObjectADataSourceControlobject.
DSCEventInfoTheDSCEventInfoobjectthatcontainsinformationabouttheevent.
![Page 2195: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2195.jpg)
RemarksUsetheDataPageandSectionpropertiesoftheDSCEventInfoobjecttodeterminethedataaccesspage,section,andrecordsetthatwasupdated.
![Page 2196: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2196.jpg)
ExampleThisexampledisplaysinformationaboutthesectionthatcontainstherecordthatwasupdated.
SubMSODSC_AfterUpdate(DSCInfo)
MsgBoxDSCInfo.Section.HTMLContainer.All(1).InnerText
EndSub
![Page 2197: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2197.jpg)
BeforeCollapseEvent
Occurswhenthecollapsebuttonisclickedonadataaccesspage.
PrivateSubObject_BeforeCollapse(DSCEventInfoAsDSCEVENTINFO)
ObjectThenameoftheDataSourceControlobjectthatthiseventappliesto.
DSCEventInfoTheDSCEventInfoobjectthatcontainsinformationabouttheevent.
![Page 2198: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2198.jpg)
BeforeContextMenuEvent
Occursbeforeacontextmenuistobeshown.Acontextmenuisshownwhentheuserright-clicksortheypresstheApplicationkey.
PrivateSubObject_BeforeContextMenu(ByValxAsLong,ByValyAsLong,ByValMenuAsByref,ByValCancelAsByRef)
xRepresentsthex-coordinatewherethecontextmenuistoappear.
yRepresentsthey-coordinatewherethecontextmenuistoappear.
MenuSettheValuepropertyofthisobjecttoanarraythatcontainsthemenuitemstodisplay.
CancelSettheValuepropertyofthisobjecttoTruetocancelthekeystroke.
![Page 2199: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2199.jpg)
RemarksUsethiseventtocustomizethecontextmenusintheMicrosoftOfficeWebComponents.
![Page 2200: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2200.jpg)
ExampleThisexampledisplaysacustomcontextmenu.Themenucontainsfouroptions,thelastoptiondisplaysasubmenu.
SubSpreadsheet1_BeforeContextMenu(x,y,Menu,Cancel)
DimcmContextMenu(4)DimcmClearSubMenu(2)
cmClearSubMenu(0)=Array("&All","ClearAll")cmClearSubMenu(1)=Array("&Formats","ClearFormats")cmClearSubMenu(2)=Array("&Values","ClearValues")
cmContextMenu(0)=Array("Cu&t","owc2")cmContextMenu(1)=Array("&Copy","owc3")cmContextMenu(2)=Array("&Paste","owc4")cmContextMenu(3)=EmptycmContextMenu(4)=Array("Clea&r",cmClearSubMenu)
Menu.Value=cmContextMenu
EndSub
![Page 2201: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2201.jpg)
BeforeDeleteEvent
Occursbeforearecordisdeleted.Usethiseventifyouwanttoapplyasetofconditionsbeforearecordisdeleted.
PrivateSubObject_BeforeDelete(ByValDSCEventInfoAsDSCEventInfo)
ObjectADataSourceControlobject.
DSCEventInfoTheDSCEventInfoobjectthatcontainsinformationabouttheevent.
![Page 2202: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2202.jpg)
RemarksSettheReturnValuepropertyoftheDSCEventInfoobjecttoFalsetocancelthedeletionofarecord.Whenyoucancelthedeletionofarecord,theAfterDeleteeventstillfires.
UsetheDataPageandSectionpropertiesoftheDSCEventInfoobjecttodeterminethedataaccesspage,section,andrecordsetthatwasupdated.
UsetheDisplayAlertpropertytodeterminewhetherornottheuserispromptedwhenthiseventiscalled.
![Page 2203: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2203.jpg)
ExampleThisexamplecancelsthedeletionofarecordifthe"Discontinued"fieldissettheNo.
SubMSODSC_BeforeDelete(DSCEventInfo)
DimtxtDiscontinued
'Setavariabletothetextboxthatcontainsthevalue'oftheDiscontinuedfieldfortherecordthatistobedeleted.SettxtDiscontinued=DSCEventInfo.Section.HTMLContainer_.Children("Discontinued")
'Checkthevalueofthecontrol.IftxtDiscontinued.Value="No"Then
'Displayamessagetotheuser.Msgbox"Donotdeleteproductsthathavenot"&_"beendiscontinued."
Cancelthedeletionoftherecord.DSCEventInfo.ReturnValue=FalseEndIf
EndSub
![Page 2204: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2204.jpg)
BeforeExpandEvent
Occurswhenevertheexpandbuttonisclickedonadataaccesspage.
PrivateSubObject_BeforeExpand(DSCEventInfoAsDSCEVENTINFO)
ObjectThenameoftheDataSourceControlobjectthatthiseventappliesto.
DSCEventInfoTheDSCEventInfoobjectthatcontainsinformationabouttheevent.
![Page 2205: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2205.jpg)
BeforeFirstPageEvent
Occursbeforethefirstsetofrecordsisdisplayedonabandeddataaccesspage.
PrivateSubObject_BeforeFirstPage(DSCEventInfoAsDSCEVENTINFO)
ObjectThenameoftheDataSourceControlobjectthatthiseventappliesto.
DSCEventInfoTheDSCEventInfoobjectthatcontainsinformationabouttheevent.
![Page 2206: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2206.jpg)
BeforeInitialBindEvent
Occursbeforethecontrolsonthespecifieddataaccesspageareboundtotherecordsetforthefirsttime.Usethiseventtosetthepropertiesforthedataaccesspagebeforethecontrolsarepopulatedwithdata.
PrivateSubObject_BeforeInitialBind(ByValDSCEventInfoAsDSCEventInfo)
ObjectADataSourceControlobject.
DSCEventInfoTheDSCEventInfoobjectthatcontainsinformationabouttheevent.
![Page 2207: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2207.jpg)
RemarksThiseventdoesnotsupportanyoftheDSCEventInfoproperties.
![Page 2208: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2208.jpg)
BeforeInsertEvent
Occurswhenthefirstcharacterisenteredintoanewrecord,butbeforetherecordisaddedtotherecordset.
PrivateSubObject_BeforeInsert(ByValDSCEventInfoAsDSCEventInfo)
ObjectADataSourceControlobject.
DSCEventInfoTheDSCEventInfoobjectthatcontainsinformationabouttheevent.
![Page 2209: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2209.jpg)
RemarksSettheReturnValuepropertyoftheDSCEventInfoobjecttoFalsetocanceltheinsertionofanewrecord.
YoucanusetheDataPagepropertyoftheDSCEventInfoobjecttogetmoreinformationaboutthedataaccesspage.
![Page 2210: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2210.jpg)
ExampleThisexampleusestheBeforeInserteventtopreventtheuserfromaddinganotherrecordtotherecordsetonceitreaches75records.
SubMSODSC_BeforeInsert(DSCEventInfo)DimrstCurrentData
'Setavariabletotherecordset.SetrstCurrentData=DSCEventInfo.DataPage.Recordset
'Checktoseeiftherecordsethasreacheditslimit.IfrstCurrentData.RecordCount>=75then
'Displayamessagetotheuser.MsgBox"Cannotaddanymorerecords."
'Canceltheinsertionoftherecord.DSCEventInfo.ReturnValue=FalseEndIfEndSub
![Page 2211: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2211.jpg)
BeforeKeyDownEvent
Occurswhenauserpressesakeyonthekeyboard,butbeforethecontrolhasprocessedthekeystroke.Iftheuserholdsthekeydown,thiseventrepeatsitselfatthekey-repeatintervalthathasbeensetontheuser’scomputer.
PrivateSubObject_BeforeKeyDown(ByValKeyCodeAsLong,ByValShiftAsLong,ByValCancelAsByRef)
ObjectAChartSpace,PivotTable,orSpreadsheetobject.
KeyCodeAnintegerthatrepresentsthekeycodeofthekeythatwaspressedorreleased.
ShiftThestateoftheSHIFT,CTRL,andALTkeys.Returns1iftheSHIFTkeywaspressed,2iftheCTRLkeywaspressed,and4iftheALTkeywaspressed.Returns0ifneithertheSHIFT,CTRL,norALTkeyswerepressed.
CancelSettheValuepropertyofthisobjecttoTruetocancelthekeystroke.
![Page 2212: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2212.jpg)
RemarksCancelingthiseventalsocancelstheBeforeKeyPressandKeyPressevents,butdoesnotpreventthetheKeyDownorKeyUpeventsfromfiring.
Thesequenceofkeyboard-relatedeventsis:
1. BeforeKeyDown
2. KeyDown
3. BeforeKeyPress
4. KeyPress
5. BeforeKeyUp
6. KeyUp
![Page 2213: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2213.jpg)
BeforeKeyPressEvent
Occurswhenauserpressesandreleasesakeyonthekeyboard,butbeforethecontrolhasprocessedthekeystroke.Iftheuserholdsthekeydown,thiseventrepeatsitselfatthekey-repeatintervalthathasbeensetontheuser’scomputer.
PrivateSubObject_BeforeKeyPress(ByValKeyAsciiAsLong,ByValCancelAsByRef)
ObjectAChartSpace,PivotTable,orSpreadsheetobject.
KeyAsciiAnintegerthatrepresentsthekeycodeofthekeythatwaspressedorreleased.
CancelSettheValuepropertyofthisobjecttoTruetocancelthekeystroke.
![Page 2214: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2214.jpg)
RemarksCancelingthiseventdoesnotpreventtheKeyPressorKeyUpeventsfromfiring.
Thesequenceofkeyboard-relatedeventsis:
1. BeforeKeyDown
2. KeyDown
3. BeforeKeyPress
4. KeyPress
5. BeforeKeyUp
6. KeyUp
![Page 2215: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2215.jpg)
BeforeKeyUpEvent
Occurswhenauserreleasesakeyonthekeyboard,butbeforethecontrolhasprocessedthekeystroke.
PrivateSubObject_BeforeKeyUp(ByValKeyCodeAsLong,ByValShiftAsLong,ByValCancelAsByRef)
ObjectThenameoftheChartSpace,PivotTable,orSpreadsheetobjectthatthiseventappliesto..
KeyCodeAnintegerthatrepresentsthekeycodeofthekeythatwaspressedorreleased.
ShiftThestateoftheSHIFT,CTRL,andALTkeys.Returns1iftheSHIFTkeywaspressed,2iftheCTRLkeywaspressed,and4iftheALTkeywaspressed.Returns0ifneithertheSHIFT,CTRL,orALTkeyswerepressed.
CancelSettheValuepropertyofthisobjecttoTruetocancelthekeystroke.
![Page 2216: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2216.jpg)
RemarksCancelingthiseventdoesnotpreventtheKeyUpeventfromfiring.
Thesequenceofkeyboard-relatedeventsis:
1. BeforeKeyDown
2. KeyDown
3. BeforeKeyPress
4. KeyPress
5. BeforeKeyUp
6. KeyUp
![Page 2217: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2217.jpg)
BeforeLastPageEvent
Occursbeforethelastsetofrecordsisdisplayedonabandeddataaccesspage.
PrivateSubObject_BeforeLastPage(DSCEventInfoAsDSCEVENTINFO)
ObjectThenameoftheDataSourceControlobjectthatthiseventappliesto.
DSCEventInfoTheDSCEventInfoobjectthatcontainsinformationabouttheevent.
![Page 2218: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2218.jpg)
BeforeNextPageEvent
Occursbeforethenextsetofrecordsisdisplayedonabandeddataaccesspage.
PrivateSubObject_BeforeNextPage(DSCEventInfoAsDSCEVENTINFO)
ObjectThenameoftheDataSourceControlobjectthatthiseventappliesto.
DSCEventInfoTheDSCEventInfoobjectthatcontainsinformationabouttheevent.
![Page 2219: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2219.jpg)
BeforeOverwriteEvent
Occurswhenanexistingfileisabouttobeoverwritten.
PrivateSubObject_BeforeOverwrite(ByValDSCEventInfoAsDSCEventInfo)
ObjectADataSourceControlobject.
DSCEventInfoTheDSCEventInfoobjectthatcontainsinformationabouttheevent.
![Page 2220: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2220.jpg)
RemarksThiseventmayoccurwhenyouusetheExportXMLmethodtoexportthecurrentrecordset.SettheReturnValuepropertyoftheDSCEventInfoobjecttoFalsetopreventtheexistingfilefrombeingoverwritten.SettheDisplayAlertpropertyoftheDSCEventInfoobjecttodscDataAlertContinuetooverwritethefilewithoutpromptingtheuser.
Note:FilesthatwerenotcreatedbytheDataSourceControlwillnotbeoverwritten.
![Page 2221: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2221.jpg)
ExampleThisexampleallowsafilecreatedbytheExportXMLmethodtobeoverwrittenwithoutpromptingtheuser.
SubMSODSC_BeforeOverwrite(DSCEventInfo)
DimdscConstantsSetdscConstants=MSODSC.Constants
'Don'talerttheuserwhenoverwritinganexistingfile.DSCEventInfo.DisplayAlert=dscConstants.dscDataAlertContinue
EndSub
![Page 2222: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2222.jpg)
BeforePreviousPageEvent
Occursbeforetheprevioussetofrecordsisdisplayedonabandeddataaccesspage.
PrivateSubObject_BeforePreviousPage(DSCEventInfoAsDSCEVENTINFO)
ObjectThenameoftheDataSourceControlobjectthatthiseventappliesto.
DSCEventInfoTheDSCEventInfoobjectthatcontainsinformationabouttheevent.
![Page 2223: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2223.jpg)
BeforeRenderEvent
OccursbeforetheobjectpassedinthechartObjectargumenthasbeenrendered.
PrivateSubObject_BeforeRender(ByValdrawObjectAsChChartDraw,ByValchartObjectAsObject,CancelAsByRef)
ObjectThenameoftheChartSpaceobjectthatyouaretrappingthiseventfor.
drawObjectAreferencetotheChChartDrawobject.UsetheDrawTypepropertyofthereturnedobjecttodeterminewhattypeofrenderingisabouttooccur.
chartObjectTheobjectthatistoberendered.UsetheTypeNamefunctiontodeterminethetypeoftheobject.
CancelSettheValuepropertyofthisobjecttoTruetocanceltherenderingoftheobjectrepresentedbychartObject.
![Page 2224: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2224.jpg)
RemarksYoumustsettheAllowRenderEventsandAllowPointsRenderEventspropertiestoTrueinordertousethiseventwithallchartobjects.
![Page 2225: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2225.jpg)
ExampleThisexampleillustrateshowyoucanusetheBeforeRenderandAfterRendereventstogethertocreatecustomgridlines.TheBeforeRendereventcancelstherenderingofthegridlinesandtheAfterRendereventdrawscustomgridlines.
SubChartSpace1_BeforeRender(drawObject,chartObject,Cancel)
'Checktoseeifthenextobjecttoberendered'isagridline.IfTypeName(chartObject)="ChGridlines"Then
'Canceltherenderingofgridlines.Cancel.Value=TrueEndIfEndSub
SubChartSpace1_AfterRender(drawObject,chartObject)DimchChart1DimplPlotAreaDimlLeftDimlRightDimlHeightDimlTopDimlIncrementDimchConstantsDimiCtr
SetchConstants=ChartSpace1.Constants
'SetavariabletothefirstchartinChartspace1.SetchChart1=ChartSpace1.Charts(0)
![Page 2226: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2226.jpg)
'Setavariabletotheplotareaofthechart.SetplPlotArea=chChart1.PlotArea
'Checktoseeiftherenderedobjectisagridline.IfTypeName(chartObject)="ChGridlines"Then
'Thenextfourlinesofcodeusetheextentsof'theplotareatocalculatethedimensionsoftheline'tobedrawn.lLeft=plPlotArea.LeftlTop=plPlotArea.ToplRight=plPlotArea.RightlHeight=plPlotArea.Bottom-lTop
'Determinetheincrementtousebetweengridlines.'Changethedivisortoadjusttheincrement.lIncrement=lHeight/10
'Thenextthreelinesofcodesetthepropertiesofthe'linetobedrawn.drawObject.Line.DashStyle=chConstants.chLineRoundDotdrawObject.Line.Color="Green"drawObject.Line.Weight=chConstants.owcLineWeightMedium
ForiCtr=1To9
'Drawtheline.drawObject.DrawLinelLeft,lTop+iCtr*lIncrement,_lRight,lTop+iCtr*lIncrementNextEndIfEndSub
![Page 2227: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2227.jpg)
![Page 2228: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2228.jpg)
ShowAll
![Page 2229: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2229.jpg)
BeforeScreenTipEvent
BeforeScreenTipeventasitappliestotheChartSpaceobject.
BeforeScreenTipeventasitappliestothePivotTableobject.
![Page 2230: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2230.jpg)
RemarksUsethiseventtocustomizeScreenTipsdisplayedinachartorPivotTablelist.
![Page 2231: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2231.jpg)
BeforeUpdateEvent
Occurswhendataischanged,butbeforetherecordsetisupdated.Usethiseventtovalidatedatabeforeitiscommittedtothedatabase.
PrivateSubObject_BeforeUpdate(ByValDSCEventInfoAsDSCEventInfo)
ObjectADataSourceControlobject.
DSCEventInfoTheDSCEventInfoobjectthatcontainsinformationabouttheevent.
![Page 2232: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2232.jpg)
RemarksUsetheDataPageandSectionpropertiesoftheDSCEventInfoobjecttodeterminethedataaccesspage,section,andrecordsetthatwasupdated.
SettheReturnValuepropertyoftheDSCEventInfoobjecttoFalsetocanceltheupdate.
![Page 2233: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2233.jpg)
ExampleThisexamplecancelstheupdatingoftherecordsetwhentheuserentersavaluegreaterthan0fortheUnitsOnOrderfieldwhentheUnitsInStockfieldisgreaterthan100.
SubMSODSC_BeforeUpdate(DSCEventInfo)
DimtxtUnitsOnOrderDimtxtUnitsInStock
'Setavariabletothetextboxthatcontainsthevalue'fortheUnitsOnOrderfield.SettxtUnitsOnOrder=DSCEventInfo.Section.HTMLContainer_.Children("UnitsOnOrder")
'Setavariabletothetextboxthatcontainsthevalue'fortheUnitsInStockfield.SettxtUnitsInStock=DSCEventInfo.Section.HTMLContainer_.Children("UnitsInStock")
'CheckthevalueoftheUnitsOnOrderField.IfCLng(txtUnitsOnOrder.Value)>0then
'CheckthevalueoftheUnitsInStockField.IfCLng(txtUnitsInStock.Value)>100then
'Displayamessagetotheuser.MsgBox"Don'treorderthepartuntilfewerthan100areinstock."
'Canceltheupdate.DSCEventInfo.ReturnValue=False
![Page 2234: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2234.jpg)
EndIfEndIf
EndSub
![Page 2235: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2235.jpg)
BindingAddedEvent
OccurswhenaneworexistingXmlDataBindingobjectisaddedormodifiedthroughtheEditQuerycommand.
PrivateSubSpreadsheet1_BindingAdded(BindingId)
BindingIdTheuniqueIDofanXmlDataBindingobject.
![Page 2236: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2236.jpg)
Remarks
TheBindingIdisautomaticallygeneratedbytheSpreadsheetcomponentwhenyoubindtoadataretrievalserviceconnection(.uxdc)file.MicrosoftExcelalsoautomaticallygeneratestheBindingIdwhenyouuseExceltocreateadata-boundspreadsheetandlatersaveitasanXMLSpreadsheetfile.IntheXMLSpreadsheetfile,theXMLfragmentthatcontainstheBindingIdlookssomethinglikethefollowing:
<x2:Bindingx2:ID="Bind_id89929"x2:LoadMode="Normal"x2:Async="False">YoucanalsomanuallyassignaBindingIdvaluebyaddingtherelevantXMLfragmentthatcontainsdata-bindingdetailsintoanXMLSpreadsheetfile.
![Page 2237: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2237.jpg)
ExampleThefollowingexampleinMicrosoftVisualBasicScriptingEdition(VBScript)tracksthenumberofXmlDataBindingobjecteventsanddisplaystheBindingIdofthegiveneventwhenitoccurs.
'globalXmlDataBindingobjectBindingAddedeventcounter.DimgintCounterBindingAddedgintCounterBindingAdded=0
SubSpreadsheet1_BindingAdded(BindingId)
gintCounterBindingAdded=gintCounterBindingAdded+1MsgBox("BindingAddedandBindingIDis:"&BindingId)
EndSub
![Page 2238: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2238.jpg)
BindingCompletedEvent
OccursafterdataissuccessfullyloadedintoorexportedfromamapthroughaRefreshorUpdatemethod.
PrivateSubSpreadsheet_BindingCompleted(BindingId,Action)
BindingIdRequiredString.TheuniqueIDofanXmlDataBindingobject.YoucanalsomanuallyassignaBindingIdvaluebyaddingtherelevantXMLfragmentthatcontainsdata-bindingdetailsintoanXMLSpreadsheetfile.
ActionReferstothetypeofbindingoperationthatwascompleted.Thepossiblevaluesare"Refresh"and"Update".
![Page 2239: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2239.jpg)
Remarks
AuniqueBindingIdisautomaticallygeneratedbytheSpreadsheetcomponentwhenyoubindtoadataretrievalserviceconnection(.uxdc)file.MicrosoftExcelalsoautomaticallygeneratesaBindingIdwhenyouuseExceltocreateadata-boundspreadsheetandlatersaveitasanXMLspreadsheetfile.IntheXMLSpreadsheetfile,theXMLfragmentthatcontainstheBindingIdlookssomethinglikethefollowing:
<x2:Bindingx2:ID="bind_id0"x2:Async="True"xmlns:x2="urn:schemas-microsoft-com:office:excel2"xmlns:dsp="http://schemas.microsoft.com/sharepoint/dsp"xmlns:udc="http://schemas.microsoft.com/data/udc"xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/"xmlns:udcs="http://schemas.microsoft.com/data/udc/soap"><x2:MapID>map_id0</x2:MapID><udc:DataSourceMajorVersion="1"MinorVersion="0"><udc:Name/><udc:TypeType="SOAP"MajorVersion="1"MinorVersion="0"> <udc:SubTypeType="DSP"MajorVersion="1"MinorVersion="0"/></udc:Type><udc:ConnectionInfoPurpose="Query"><udcs:SOAPAction>http://schemas.microsoft.com/sharepoint/dsp/queryRequest</udcs:SOAPAction><udcs:Locationhref="Data_Retrieval_Services_URL">SQLDataAdapter</udcs:Location><soap-env:Body><dsp:queryRequest><dsp:dsQueryselect="/database[@id='Database_Name']/table[@id='Table_Name']"resultContent="dataOnly"><dsp:QueryRowLimit="10"QueryType="DSPQ"><dsp:Fields><dsp:FieldName="Column_Name"/></dsp:Fields></dsp:Query></dsp:dsQuery>
![Page 2240: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2240.jpg)
</dsp:queryRequest></soap-env:Body><soap-env:Header><dsp:versions><dsp:version>1.0</dsp:version></dsp:versions><dsp:dataRoot><dsp:root>SQL_Server</dsp:root></dsp:dataRoot><dsp:requestservice="DspSql"document="content"method="query"/><dsp:authentication><dsp:basic><dsp:useExplicit><dsp:userId>user_name</dsp:userId><dsp:password>password</dsp:password></dsp:useExplicit></dsp:basic></dsp:authentication></soap-env:Header></udc:ConnectionInfo></udc:DataSource></x2:Binding>
TheBindingCompletedeventistriggeredafterdataissuccessfullyloadedintoorexportedoutofamapthroughaRefreshorUpdatemethod.ThiseventisalsotriggeredwhenthepageisfirstrenderedforquerybindingswheretheLoadModeattributeoftheBindingelementissetto"normal".
Duringanasynchronousbinding,somemethodsrelatedtodatabindingwillgeneraterun-timeerrorssayingthattherequestedoperationcannotbecompletedbecauseanasynchronousbindingisinprogress.Callstothesemethodssucceedwhentheasynchronousbindingisdone.Formoreinformation,seetheXMLDataBindingobjectdocumentation.
SolutiondevelopersshouldtraptheBindingCompletedand
![Page 2241: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2241.jpg)
BindingErroreventstofindoutwhenthebindingisfinished.NotethatusingtheBindingCompletedeventtoselectanXMLrowdoesnotsendthatrowtoapart-to-partbindingconsumerwhenthepageisloaded.UsetheWindow.Onloadeventforthatpurpose.
ThefollowingXMLfragmentexampleshowsLoadMode="normal":
<x2:Bindingx2:ID="Bind_id89929"x2:LoadMode="normal"x2:Async="true"xmlns:x2="http://schemas.microsoft.com/office/excel/2003/xml"> ...</x2:Binding>
ThefollowingexampleshowshowtotraptheBindingCompletedeventfromscriptrunninginaWebpagewhenthepageisfirstloadedandwhenevertheuserrefreshesthebounddata(thebehaviorwhentheLoadModeattributeissetto"normal").Toworkcorrectly,youmustputtheeventhandlerfortheBindingCompletedeventina<SCRIPT>tagthatislocatedbeforethe<OBJECT>tagoftheSpreadsheetcomponent.
<SCRIPTlanguage=vbscriptfor="Spreadsheet1"event="BindingCompleted(bindingID,Action)">
IfSpreadsheet1.ActiveWorkbook.XmlDataBindings.Item(bindingID).CanQuery=TrueThen
MsgBox"BindingCompleted."
EndIf
</SCRIPT>
<OBJECTid=Spreadsheet1classid=CLSID:0002E559-0000-0000-C000-000000000046>...</OBJECT>
![Page 2242: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2242.jpg)
BindingDeletedEvent
OccurswhenanewXmlDataBindingobjectisdeleted.
PrivateSubSpreadsheet_BindingDeleted(BindingId)
BindingIdRequiredString.TheuniqueIDofanXmlDataBindingobject.TheuniqueBindingIdisautomaticallygeneratedbytheSpreadsheetcomponentwhenyoubindtoadataretrievalserviceconnection(.uxdc)file.MicrosoftExcelalsoautomaticallygeneratestheBindingIdwhenyouuseExceltocreateadata-boundspreadsheetandlatersaveitasanXMLSpreadsheetfile.IntheXMLSpreadsheetfile,theXMLfragmentthatcontainstheBindingIdlookssomethinglikethefollowing:<x2:Bindingx2:ID="Bind_id89929"x2:LoadMode="normal"x2:Async="False">.YoucanalsomanuallyassignaBindingIdvaluebyaddingtherelevantXMLfragmentthatcontainsdata-bindingdetailsintoanXMLSpreadsheetfile.
![Page 2243: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2243.jpg)
ExampleThefollowingexampletracksthenumberofBindingDeletedeventsanddisplaystheBindingIdofthegiveneventwhenitoccurs.
'globalXmlDataBindingobjectBindingDeletedeventcounter.DimgintCounterBindingDeletedgintCounterBindingDeleted=0
SubSpreadsheet1_BindingDeleted(BindingId)gintCounterBindingDeleted=gintCounterBindingDeleted+1MsgBox"BindingDeletedandBindingIdis:"&BindingIdEndSub
![Page 2244: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2244.jpg)
BindingErrorEvent
OccursafteranerrorisreceivedfromthedatasourcefollowingacalltoRefreshorUpdatemethodoperation.
PrivateSubSpreadsheet1_BindingError(BindingId,Action,DialogText,FaultCode,FaultString,FaultDetail)
BindingIdRequiredString.TheuniqueIDofanXmlDataBindingobject.TheuniqueBindingIdisautomaticallygeneratedbytheSpreadsheetcomponentwhenyoubindtoadataretrievalserviceconnection(.uxdc)file.MicrosoftExcelalsoautomaticallygeneratestheBindingIdwhenyouuseExceltocreateadata-boundspreadsheetandlatersaveitasanXMLSpreadsheetfile.IntheXMLSpreadsheetfile,theXMLfragmentthatcontainstheBindingIdlookssomethinglikethefollowing:<x2:Bindingx2:ID="Bind_id89929"x2:LoadMode="normal"x2:Async="False">.YoucanalsomanuallyassignaBindingIdvaluebyaddingtherelevantXMLfragmentthatcontainsdata-bindingdetailsintoanXMLSpreadsheetfile.
ActionRequiredString.Referstothetypeofbindingoperationthatwascompleted.Thepossiblevaluesare"Refresh"and"Update".
DialogTextRequiredString.Referstotheerrorstringmappedtothefaultcodereceived.
FaultCodeRequiredString.Correspondstothe<FaultCode>elementinthefaultmessage—forexample,"Client.Dsp.Authentication".
FaultStringRequiredString.Correspondstothe<FaultString>elementinthefaultmessage—forexample,"Can'tlogonuser<username>".
FaultDetailRequiredString.Correspondstothe<Detail>elementinthefaultmessage—forexample,<dsp:queryResponsestatus="failure"xmlns:dsp="http://schemas.microsoft.com/sharepoint/dsp"></dsp:queryResponse><dsp:author>authorName</dsp:author>ThesestringsmatchthestructureofdataretrievalserviceconnectionSOAPfaultmessages.
![Page 2245: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2245.jpg)
Remarks
ForXMLSpreadsheetfilesandpart-to-partbindings,theDialogTexterrorstringwillbepresentinthefaultmessagebutnotintheFaultCode,FaultStringandFaultDetailparameters.ForarbitrarySOAPbindings,FaultCodeandFaultStringarereturnedbyallXMLWebservicesfaultmessages—buttheoptionalelementFaultDetailisnotreturnedbymostXMLWebservices,includingdataretrievalservices.
WhenaRefreshorUpdatemethodfails,theBindingErroreventfiresandanerrordialogboxisdisplayed.Tocatchtheerrorinscript,solutiondevelopersshouldtraptheBindingErrorevent.Theerrorwon'tbereturnedbytheRefreshorUpdatemethodsorbyInternetExplorer.WhenRefreshorUpdateiscalledonanasynchronousbinding,thesemethodsreturnimmediately.
SolutiondevelopersshouldtraptheBindingCompletedandBindingErroreventstofindoutwhenthebindingisfinished.NotethatusingtheBindingCompletedeventtoselectanXMLrowdoesnotsendthatrowtoapart-to-partbindingconsumerwhenthepageisloaded.UsetheWindow.Onloadeventforthispurpose.
![Page 2246: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2246.jpg)
BindingUpdatedEvent
OccurswhentheBindingDatapropertyofanexistingXmlDataBindingobjectischanged.
PrivateSubSpreadsheet1_BindingUpdated(BindingId)
BindingIdRequiredString.TheuniqueIDofanXmlDataBindingobject.
BindingIdRequiredString.TheuniqueIDofanXmlDataBindingobject.TheuniqueBindingIdisautomaticallygeneratedbytheSpreadsheetcomponentwhenyoubindtoadataretrievalserviceconnection(.uxdc)file.MicrosoftExcelalsoautomaticallygeneratestheBindingIdwhenyouuseExceltocreateadata-boundspreadsheetandlatersaveitasanXMLSpreadsheetfile.IntheXMLSpreadsheetfile,theXMLfragmentthatcontainstheBindingIdlookssomethinglikethefollowing:<x2:Bindingx2:ID="Bind_id89929"x2:LoadMode="normal"x2:Async="False">.YoucanalsomanuallyassignaBindingIdvaluebyaddingtherelevantXMLfragmentthatcontainsdata-bindingdetailsintoanXMLSpreadsheetfile.
![Page 2247: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2247.jpg)
Remarks
TheXmlDataBindingobjectcontainsconfigurationdataintheformofXML.YoucanusetheBindingDatapropertytoreturnorsettheconfigurationdataforagivenXmlDataBindingobject.
![Page 2248: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2248.jpg)
ShowAll
![Page 2249: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2249.jpg)
ButtonClickEvent
Occurswhenevertheuserclicksanavigationbutton.
PrivateSubRecordNavigationControl_ButtonClick(NavButtonAsNavButtonEnum)
NavButtonSpecifiesthebuttonthat,whenclicked,triggerstheButtonClickevent.CanbeoneoftheNavButtonEnumconstants.
![Page 2250: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2250.jpg)
RemarksForinformationaboutusingeventswithVBScript,seeDeclaringandUsingEventProceduresinVBScript.
![Page 2251: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2251.jpg)
ChangeEvent
Occurswheneverdatainoneormorecellschanges.Botheditsandcopy-and-pasteoperationscausethiseventtooccur.
PrivateSubRange_Change()
![Page 2252: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2252.jpg)
RemarksThiseventoccursaftertheEndEditevent;atthispoint,thedatahasalreadybeenchangedandthechangecannotbecanceled.
ThiseventrequirestheWithEventskeyword,soitcannotbeusedwithVBScriptorJScript.
![Page 2253: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2253.jpg)
ExampleThefollowingexampleupdatesalabelcontrolonaVisualBasicformwhenthevalueincellA1ofSheet1inSpreadsheet1changes.
DimWithEventsrngRange1AsRange
PrivateSubForm_Load()
'Setavariabletotherangeforwhichyouwanttocapture'theChangeevent.SetrngRange1=Spreadsheet1.Worksheets("Sheet1").Range("A1")
EndSub
PrivateSubrngRange1_Change()'ChangethecaptionofLabel1tothecurrentvalue'ofcellA1.Label1.Caption=rngRange1.ValueEndSub
![Page 2254: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2254.jpg)
ClickEvent
Occurswhenevertheuserclicksthespecifiedcontrol.
PrivateSubobject_Click()
objectAChartSpace,PivotTable,orSpreadsheetobject.
![Page 2255: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2255.jpg)
RemarksForinformationaboutusingeventswithVBScript,seeDeclaringandUsingEventProceduresinVBScript.
![Page 2256: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2256.jpg)
CommandBeforeExecuteEvent
Occursbeforeacommandisexecuted.Usethiseventwhenyouwanttoimposecertainrestrictionsbeforeacommandisexecuted.
PrivateSubobject_CommandBeforeExecute(ByValCommandAsVariant,ByValCancelAsByRef)
objectAChartSpace,PivotTable,orSpreadsheetobject.
CommandRequired.Thecommandthathasbeenexecuted.
CancelRequired.SettheValuepropertyofthisobjecttoTruetocancelthecommand.
![Page 2257: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2257.jpg)
RemarksTheOCCommandId,ChartCommandIdEnum,PivotCommandId,andSpreadsheetCommandIdconstantscontainlistsofthesupportedcommandsforeachoftheMicrosoftOfficeWebComponents.
![Page 2258: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2258.jpg)
ExampleThisexamplerefreshesPivotTable1whentheexportcommandisinvokedsothatthelatestdataisexportedtoMicrosoftExcel.
SubPivotTable1_CommandBeforeExecute(Command,Cancel)
DimptConstants
SetptConstants=PivotTable1.Constants
'ChecktoseeiftheExportcommand'hasbeeninvoked.IfCommand=ptConstants.plCommandExportThen
'RefreshthePivotTablelist.PivotTable1.Refresh
EndIf
EndSub
![Page 2259: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2259.jpg)
CommandCheckedEvent
OccurswhenthethespecifiedMicrosoftOfficeWebComponentdetermineswhetheracommandischecked.
PrivateSubobject_CommandChecked(ByValCommandAsVariant,ByValCheckedAsByRef)
objectAChartSpace,PivotTable,orSpreadsheetobject.
CommandRequired.Thecommandthathasbeenexecuted.
CheckedRequired.SettheValuepropertyofthisobjecttoTruetouncheckthecommand.
![Page 2260: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2260.jpg)
RemarksTheOCCommandId,ChartCommandIdEnum,PivotCommandId,andSpreadsheetCommandIdconstantscontainlistsofthesupportedcommandsforeachWebcomponent.
![Page 2261: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2261.jpg)
CommandEnabledEvent
OccurswhenthethespecifiedMicrosoftOfficeWebComponentcommandisenabled.
PrivateSubobject_CommandEnabled(ByValCommandAsVariant,ByValEnabledAsByRef)
objectAChartSpace,PivotTable,orSpreadsheetobject.
CommandRequired.Thecommandthathasbeenexecuted.
EnabledRequired.SettheValuepropertyofthisobjecttoTruetodisablethecommand.
![Page 2262: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2262.jpg)
RemarksTheOCCommandID,ChartCommandIDEnum,PivotCommandId,andSpreadsheetCommandIdconstantscontainlistsofthesupportedcommandsforeachWebcomponent.
![Page 2263: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2263.jpg)
CommandExecuteEvent
Occursafteracommandisexecuted.Usethiseventwhenyouwanttoexecuteasetofcommandsafteraparticularcommandisexecuted.
PrivateSubobject_CommandExecute(ByValCommandAsVariant,ByValSucceededAsBoolean)
objectAChartSpace,PivotTable,orSpreadsheetobject.
CommandThecommandthathasbeenexecuted.
SucceededReturnsTrueifthecommandsucceeded.
![Page 2264: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2264.jpg)
RemarksTheOCCommandId,ChartCommandIdEnum,PivotCommandId,andSpreadsheetCommandIdconstantscontainlistsofthesupportedcommandsforeachoftheOfficeWebComponents.
![Page 2265: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2265.jpg)
ExampleThisexamplewritesthecurrentdateandtimetoaHTMLtextboxcontroleverytimethatPivotTable1isrefreshed.
SubPivotTable1_CommandExecute(Command,Succeeded)
DimptConstants
SetptConstants=PivotTable1.Constants
'ChecktoseeifthePivotTablelisthasbeenrefreshed.IfCommand=ptConstants.plCommandRefreshThen
'Writethecurrentdataandtimetothetextbox.TextBox.Value="PivotTableLastRefeshedon"&_Date&"at"&Time
EndIf
EndSub
![Page 2266: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2266.jpg)
CommandTipTextEvent
OccurswhenthethespecifiedMicrosoftOfficeWebComponentqueriesacommand'sScreenTiptext.
PrivateSubobject_CommandTipText(ByValCommandAsVariant,ByValCaptionAsByRef)
objectAChartSpace,PivotTable,orSpreadsheetobject.
CommandThecommandthathasbeenexecuted.
CaptionTheValuepropertyofthisobjectcontainstheScreenTiptextforthecommand.
![Page 2267: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2267.jpg)
RemarksTheOCCommandId,ChartCommandIdEnum,PivotCommandId,andSpreadsheetCommandIdconstantscontainlistsofthesupportedcommandsforeachWebcomponent.
![Page 2268: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2268.jpg)
CurrentEvent
Occurswhenarecordbecomesthecurrentrecord.
PrivateSubObject_Current(DSCEventInfoAsDSCEVENTINFO)
ObjectThenameoftheDataSourceControlobjectthatthiseventappliesto.
DSCEventInfoTheDSCEventInfoobjectthatcontainsinformationabouttheevent.
![Page 2269: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2269.jpg)
ShowAll
![Page 2270: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2270.jpg)
DataChangeEvent
Occurswhencertainpropertiesarechangedorwhencertainmethodsareexecuted.SeethePivotDataReasonEnumconstantformoreinformationaboutthepropertiesandmethodsthatcantriggerthisevent.
PrivateSubObject_DataChange(ByValReasonAsPivotDataReasonEnum)
ObjectThenameofthePivotTableobjectthatyouaretrappingthiseventfor.
ReasonUsethevalueofthePivotDataReasonEnumconstanttodeterminethereasonthatthiseventwastriggered.
![Page 2271: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2271.jpg)
DataErrorEvent
Occurswheneveradataerroroccurs.
PrivateSubObject_DataError(DSCEventInfoAsDSCEVENTINFO)
ObjectThenameoftheDataSourceControlobjectthatthiseventappliesto.
DSCEventInfoTheDSCEventInfoobjectthatcontainsinformationabouttheevent.
![Page 2272: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2272.jpg)
DataPageCompleteEvent
Occurswhenthespecifieddataaccesspagefinishesloading.
PrivateSubObject_DataPageComplete(DSCEventInfoAsDSCEVENTINFO)
ObjectThenameoftheDataSourceControlobjectthatthiseventappliesto.
DSCEventInfoTheDSCEventInfoobjectthatcontainsinformationabouttheevent.
![Page 2273: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2273.jpg)
DataSetChangeEvent
Occurswheneverachartworkspaceisdata-boundandthedatasetchanges—forexample,whenafilteroperationtakesplace.Thiseventalsooccurswheninitialdataisavailablefromthedatasource.
PrivateSubObject_DataSetChange()
ObjectThenameoftheChartSpaceobjectthatthiseventappliesto.
![Page 2274: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2274.jpg)
RemarksForinformationaboutusingeventswithVBScript,seeDeclaringandUsingEventProceduresinVBScript.
![Page 2275: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2275.jpg)
DblClickEvent
Occurswhenevertheuserdouble-clicksthespecifiedcontrol.
PrivateSubobject_DblClick()
objectAChartSpace,PivotTable,orSpreadsheetobject.
![Page 2276: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2276.jpg)
DirtyEvent
Occurswhenthecontentsofadataaccesspagearechangedbytheuser.
PrivateSubObject_Dirty(ByValDSCEventInfoAsDSCEventInfo)
ObjectADataSourceControlobject.
DSCEventInfoTheDSCEventInfoobjectthatcontainsinformationabouttheevent.
![Page 2277: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2277.jpg)
RemarksSettheReturnValuepropertyoftheDSCEventInfoobjecttoFalsetorestorethepreviousvalue.
UsetheDataPageandSectionpropertiesoftheDSCEventInfoobjecttodeterminethedataaccesspage,section,andrecordsetthatwasupdated.
ThiseventfiresbeforetheBeforeUpdateevent.
![Page 2278: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2278.jpg)
EndEditEvent
OccurswhenevertheuserswitchesfromeditmodeonthespecifiedSpreadsheetControlorPivotTablelist.YoucanusethiseventtovalidatedataentryinaworksheetorinthedetailareaofaPivotTablelist.
PrivateSubObject_EndEdit(ByValAcceptAsBoolean,ByValFinalValueAsByRef,ByValCancelAsByRef,ByValErrorDescriptionAsByRef)
ObjectAPivotTableorSpreadsheetobject.
AcceptSpecifieswhetherornotthespecifiedcontrolisacceptingtheedit.IfthisargumentisFalse,thenthecontrolisleavingeditmodebecausetheusercancelledtheedit.IfthisargumentisTrue,thenyoucancanceltheedit.
FinalValueTheValuepropertyofthisargumentreturnsthevaluethatistobeenteredintotheworksheetorPivotTablelist.
CancelSettheValuepropertyofthisargumenttoTruetocanceltheeditandleavetheuserineditmode.
ErrorDescriptionSettheValuepropertyofthisargumenttothetextthatyouwanttodisplaytotheuser.Thedefaulttextis"Thenewvaluewasnotaccepted.".
![Page 2279: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2279.jpg)
FocusEvent
Occurswhenasectioninadataaccesspagereceivesfocus.
PrivateSubObject_Focus(ByValDSCEventInfoAsDSCEventInfo)
ObjectADataSourceControlobject.
DSCEventInfoTheDSCEventInfoobjectthatcontainsinformationabouttheevent.
![Page 2280: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2280.jpg)
RemarksUsetheDataPageandSectionpropertiesoftheDSCEventInfoobjecttodeterminethedataaccesspage,section,andrecordsetthatwasupdated.
![Page 2281: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2281.jpg)
InitializeEvent
OccurswhentheSpreadsheetComponentisloading,butbeforeitisloadedcompletely.
PrivateSubObject_Initialize()
ObjectThenameoftheSpreadsheetobjectthatyouaretrappingthiseventfor.
![Page 2282: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2282.jpg)
RemarksUsethiseventtoinitializethesettingsforthespreadsheet.
![Page 2283: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2283.jpg)
ExampleThisexampleusestheInitializeeventtosetthespreadsheetdatafromafileontheuser'scomputer.
SubSpreadsheet1_Initialize()
'LoadaCSVfileintothespreadsheet.Spreadsheet1.CSVURL="Data.csv"
EndSub
![Page 2284: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2284.jpg)
KeyDownEvent
Occurswhenevertheuserpressesakeyonthekeyboard.Iftheuserholdsthekeydown,thiseventrepeatsitselfatthekey-repeatintervalthathasbeensetontheuser’scomputer.
PrivateSubObject_KeyDown(ByValKeyCodeAsLong,ByValShiftAsLong)
ObjectThenameoftheChartSpace,PivotTableorSpreadsheetobjectthatyouaretrappingthiseventfor.
KeyCodeALongthatrepresentsthekeycodeofthekeythatwaspressedorreleased.
ShiftThestateoftheSHIFT,CTRL,andALTkeys.Returns1iftheSHIFTkeywaspressed,2iftheCTRLkeywaspressed,and4iftheALTkeywaspressed.Returns0ifneithertheSHIFT,CTRL,norALTkeyswerepressed.
![Page 2285: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2285.jpg)
RemarksForinformationaboutusingeventswithVBScript,seeDeclaringandUsingEventProceduresinVBScript.
Thesequenceofkeyboard-relatedeventsis:
1. BeforeKeyDown
2. KeyDown
3. BeforeKeyPress
4. KeyPress
5. BeforeKeyUp
6. KeyUp
![Page 2286: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2286.jpg)
KeyPressEvent
Occurswhenevertheuserpressesandreleasesakeyonthekeyboard.
PrivateSubObject_KeyPress(ByValKeyAsciiAsLong)
ObjectThenameoftheChartSpace,PivotTableorSpreadsheetobjectthatyouaretrappingthiseventfor.
KeyAsciiALongthatrepresentsthekeycodeofthekeythatwaspressedorreleased.
![Page 2287: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2287.jpg)
RemarksThiseventwillnotbecallediftheBeforeKeyDowneventiscancelled.
ForinformationaboutusingeventswithVBScript,seeDeclaringandUsingEventProceduresinVBScript.
Thesequenceofkeyboard-relatedeventsis:
1. BeforeKeyDown
2. KeyDown
3. BeforeKeyPress
4. KeyPress
5. BeforeKeyUp
6. KeyUp
![Page 2288: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2288.jpg)
KeyUpEvent
Occurswhenevertheuserreleasesakeyonthekeyboard.
PrivateSubObject_KeyUp(ByValKeyCodeAsLong,ByValShiftAsLong)
ObjectThenameoftheChartSpace,PivotTableorSpreadsheetobjectthatyouaretrappingthiseventfor.
KeyCodeALongthatrepresentsthekeycodeofthekeythatwaspressedorreleased.
ShiftThestateoftheSHIFT,CTRL,andALTkeys.Returns1iftheSHIFTkeywaspressed,2iftheCTRLkeywaspressed,and4iftheALTkeywaspressed.Returns0ifneithertheSHIFT,CTRL,norALTkeyswerepressed.
![Page 2289: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2289.jpg)
RemarksForinformationaboutusingeventswithVBScript,seeDeclaringandUsingEventProceduresinVBScript.
Thesequenceofkeyboard-relatedeventsis:
1. BeforeKeyDown
2. KeyDown
3. BeforeKeyPress
4. KeyPress
5. BeforeKeyUp
6. KeyUp
![Page 2290: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2290.jpg)
LoadCompletedEvent
OccurswhentheSpreadsheetComponenthascompletedloading.
PrivateSubObject_LoadCompleted()
ObjectThenameoftheSpreadsheetobjectthatyouaretrappingthiseventfor.
![Page 2291: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2291.jpg)
MouseDownEvent
Occurswhenevertheuserpressesamousebuttonwhilethepointerispositionedoverthespreadsheet,PivotTablelist,orthechartworkspace.
PrivateSubObject_MouseDown(ByValButtonAsLong,ByValShiftAsLong,ByValxAsLong,ByValyAsLong)
ObjectThenameoftheChartSpace,PivotTableorSpreadsheetobjectthatyouaretrappingthiseventfor.
ButtonThemousebuttonthatwasreleased.Returns1iftheprimarymousebuttonwasreleased,2ifthesecondarymousebuttonwasreleased,or4ifthemiddlemousebuttonwasreleased.
ShiftThestateoftheSHIFT,CTRL,andALTkeyswhentheeventoccurred.Returns1iftheSHIFTkeywaspressed,2iftheCTRLkeywaspressed,or4iftheALTkeywaspressed.Returns0ifneithertheSHIFT,CTRL,norALTkeyswerepressed.
xTheXcoordinateofthemousepointer.
yTheYcoordinateofthemousepointer.
![Page 2292: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2292.jpg)
RemarksForinformationaboutusingeventswithVBScript,seeDeclaringandUsingEventProceduresinVBScript.
![Page 2293: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2293.jpg)
MouseMoveEvent
OccurswhenevertheusermovesthemousepointeroverthePivotTablelistorthechartworkspace.
PrivateSubObject_MouseMove(ByValButtonAsLong,ByValShiftAsLong,ByValxAsLong,ByValyAsLong)
ObjectThenameoftheChartSpaceorPivotTableobjectthatyouaretrappingthiseventfor.
ButtonThemousebuttonthatwasreleased.Returns1iftheprimarymousebuttonwasreleased,2ifthesecondarymousebuttonwasreleased,or4ifthemiddlemousebuttonwasreleased.
ShiftThestateoftheSHIFT,CTRL,andALTkeyswhentheeventoccurred.Returns1iftheSHIFTkeywaspressed,2iftheCTRLkeywaspressed,or4iftheALTkeywaspressed.Returns0ifneithertheSHIFT,CTRL,norALTkeyswerepressed.
xTheXcoordinateofthemousepointer.
yTheYcoordinateofthemousepointer.
![Page 2294: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2294.jpg)
RemarksForinformationaboutusingeventswithVBScript,seeDeclaringandUsingEventProceduresinVBScript.
![Page 2295: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2295.jpg)
MouseOutEvent
Occurswhenevertheusermovesthemousepointeroutofacellonaspreadsheet.
PrivateSubObject_MouseOut(ByValButtonAsLong,ByValShiftAsLong,ByValTargetAsRange)
ObjectThenameoftheSpreadsheetobjectthatyouaretrappingthiseventfor.
ButtonThemousebuttonthatwasreleased.Returns1iftheprimarymousebuttonwasreleased,2ifthesecondarymousebuttonwasreleased,or4ifthemiddlemousebuttonwasreleased.
ShiftThestateoftheSHIFT,CTRL,andALTkeys.Returns1iftheSHIFTkeywaspressed,2iftheCTRLkeywaspressed,or4iftheALTkeywaspressed.Returns0ifneithertheSHIFT,CTRL,norALTkeyswerepressed.
TargetARangeobjectthatrepresentsthecellorcellsthatthemousepointerwasmovedoutof.
![Page 2296: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2296.jpg)
RemarksForinformationaboutusingeventswithVBScript,seeDeclaringandUsingEventProceduresinVBScript.
![Page 2297: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2297.jpg)
MouseOverEvent
Occurswhenevertheusermovesthemousepointeroveracellonthespecifiedspreadsheet.
PrivateSubObject_MouseOut(ByValButtonAsLong,ByValShiftAsLong,ByValTargetAsRange)
ObjectThenameoftheSpreadsheetobjectthatyouaretrappingthiseventfor.
ButtonThemousebuttonthatwasreleased.Returns1iftheprimarymousebuttonwasreleased,2ifthesecondarymousebuttonwasreleased,or4ifthemiddlemousebuttonwasreleased.
ShiftThestateoftheSHIFT,CTRL,andALTkeys.Returns1iftheSHIFTkeywaspressed,2iftheCTRLkeywaspressed,or4iftheALTkeywaspressed.Returns0ifneithertheSHIFT,CTRL,norALTkeyswerepressed.
TargetARangeobjectthatrepresentsthecellorcellsthatthemousepointerwasmovedover.
![Page 2298: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2298.jpg)
RemarksForinformationaboutusingeventswithVBScript,seeDeclaringandUsingEventProceduresinVBScript.
![Page 2299: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2299.jpg)
MouseUpEvent
Occurswhenevertheuserreleasesamousebuttonwhilethepointerispositionedoverthespreadsheet,PivotTablelist,orthechartworkspace.
PrivateSubObject_MouseUp(ByValButtonAsLong,ByValShiftAsLong,ByValxAsLong,ByValyAsLong)
ObjectThenameoftheChartSpace,PivotTableorSpreadsheetobjectthatyouaretrappingthiseventfor.
ButtonThemousebuttonthatwasreleased.Returns1iftheprimarymousebuttonwasreleased,2ifthesecondarymousebuttonwasreleased,4ifthemiddlemousebuttonwasreleased.
ShiftThestateoftheSHIFT,CTRL,andALTkeyswhentheeventoccurred.Returns1iftheSHIFTkeywaspressed,2iftheCTRLkeywaspressed,and4iftheALTkeywaspressed.Returns0ifneithertheSHIFT,CTRL,norALTkeyswerepressed.
xThexcoordinateofthemousepointer.
yTheycoordinateofthemousepointer.
![Page 2300: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2300.jpg)
RemarksForinformationaboutusingeventswithVBScript,seeDeclaringandUsingEventProceduresinVBScript.
![Page 2301: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2301.jpg)
MouseWheelEvent
Occurswhentheuserrotatesthemousewheelonamousedevicethathasawheel.
PrivateSubObject_MouseWheel(ByValPageAsBoolean,ByValCountAsLong)
ObjectThenameoftheChartSpace,PivotTable,orSpreadsheetobjectthatyouaretrappingthiseventfor.
PageReturnsTrueifthepagewaschanged.
CountThenumberoflinesthatwerescrolled.
![Page 2302: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2302.jpg)
ParametersOutReadyEvent
TheParametersOutReadyeventoccurswhenasetofparametersispassedfromaconnectedWebPartthatimplementstheIParametersOutProviderinterfacetoaSpreadsheetWebPartthatimplementstheIParametersOutConsumerinterface.
expression.ParametersOutReady(InterfaceNameAsString,ParamValuesAsVariant)
expressionRequired.AnexpressionthatreturnsaSpreadsheetobject.
InterfaceNameThenameoftheIParametersOutConsumerinterfacereceivingtheevent(asdefinedinthesolutionspecificationfile:InterfaceConnections/ParametersOutConsumer@Name).
ParamValuesAnarrayofstringsthatcontainstheparametersprovidedbytheWebPartimplementingtheIParametersOutProviderinterface.
![Page 2303: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2303.jpg)
Remarks
ThiseventappliesonlytoaSpreadsheetWebPartonaWebPartPageonaSharePointsite.FormoreinformationontheSpreadsheetWebPart,searchExcelhelpandtheMicrosoftDeveloperNetwork(MSDN)Website.
TheParametersOutReadyeventfireswhenaseparateWebPartthatimplementstheIParametersOutProviderinterfaceinvokestheFireParametersOutmethod.TheParamValuesparameterisanarrayofstringsinwhicheachstringcontainsthevalueofaparameter.TheParamValuesparametermusthavethesamelengthandorderastheitemslistedintheIParametersOutProviderinterfacedeclaration.Whenthiseventfires,youcanquerytheWebPartdatasourcetogettheupdateddatathathasbeensenttothedatasourcebytheWebPartthatimplementstheIParametersOutProviderinterface.
![Page 2304: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2304.jpg)
ShowAll
![Page 2305: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2305.jpg)
PivotTableChangeEvent
OccurswheneveraPivotTablelistfield,fieldset,ortotalisaddedordeleted.
PrivateSubPivotTable_PivotTableChange(ReasonAsPivotTableReasonEnum)
ReasonSpecifieshowthePivotTablelistchanged.CanbeoneofthePivotTableReasonEnumconstants.
![Page 2306: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2306.jpg)
RemarksForinformationaboutusingeventswithVBScript,seeDeclaringandUsingEventProceduresinVBScript.
![Page 2307: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2307.jpg)
QueryEvent
OccurswheneveraPivotTablelistquerybecomesnecessary.Thequerymaynotoccurimmediately;itmaybedelayeduntilthenewdataisdisplayed.
PrivateSubPivotTable_Query()
![Page 2308: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2308.jpg)
RecordExitEvent
Occurswhentheusernavigatestoanotherrecord,refreshethedataaccesspage,orclosesthedataaccesspage.
PrivateSubObject_RecordExit(DSCEventInfoAsDSCEventInfo)
ObjectThenameoftheDataSourceControlobjectthatthiseventappliesto.
DSCEventInfoTheDSCEventInfoobjectthatcontainsinformationabouttheevent.
![Page 2309: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2309.jpg)
RemarksThiseventoccursaftertheBeforeUpdateevent,butbeforetherecordischanged.
Inthecaseofabandeddataaccesspage,movingamongchildrecordsforthesameparentdoesnotfirethisevent.
SettingtheReturnValuepropertyoftheDSCEventInfoobjecttoFalsecancelsthiseventandpreventstherecordfrombeingchanged.
UsetheDataPageandSectionpropertiesoftheDSCEventInfoobjecttodeterminethedataaccesspage,section,andrecordsetthatwasupdated.
![Page 2310: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2310.jpg)
RecordsetSaveProgressEvent
OccursrepeatedlywhentheExportXMLmethodiscalled.Usethiseventtoprovidefeedbacktotheuserwhenarecordsetisexported.
PrivateSubObject_RecordsetSaveProgress(ByValDSCEventInfoAsDSCEventInfo)
ObjectADataSourceControlobject.
DSCEventInfoTheDSCEventInfoobjectthatcontainsinformationabouttheevent.
![Page 2311: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2311.jpg)
RemarksUsethePercentCompletepropertytodeterminethecurrentprogressoftheexportoperation.
YoucannotusethiseventtoupdatethecontentsofthecurrentHTMLdocument.
![Page 2312: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2312.jpg)
ExampleThisexampleusestheRecordsetSaveProgesseventtoupdateMicrosoftInternetExplorer'sstatusbarwhentherecordsetcontainedbytheDataSourceControlissaved.
SubMSODSC_RecordsetSaveProgress(DSCEventInfo)
'Updatethestatusbarwiththecurrent'completionpercentage.Window.Status=DSCEventInfo.PercentComplete
'Checktoseeifthesavehasbeencompleted.IfDSCEventInfo.PercentComplete=100then
'Clearthestatusbarwhenthesaveiscomplete.Window.Status=""EndIf
EndSub
![Page 2313: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2313.jpg)
RowReadyEvent
TheRowReadyeventprocedureoftheSpreadsheetcomponentiscalledwhenaListObjectobjectisloadedintothecomponent,whenasinglerowinaListObjectobjectisselected,andwhentheRefreshmethodoftheXmlDataBindingobjectiscalled,regardlessofthesuccessorfailureofthatmethod.
PrivateSubSpreadsheet1_RowReady(XDTNameAsString,RowDataArrayAsVariant,SelectionStatusAsString)
XDTNameContainsthevalueoftheNamepropertyoftheListObjectobject.
RowDataArrayThisparametercontainsanarrayofvaluesfromeachcellintheselectedrowwhenSelectionStatusreturns"Standard".ThearraywillbeemptywhenSelectionStatusreturns"New"or"None".
SelectionStatusContainsoneofthevaluesdescribedinthefollowingtable:
Value DescriptionNew Indicatesthatthenew,orinsertrow,isselected.Thearrayof
valuesinRowDataArraywillbeempty.None Indicatesthatnorowisselected.Thearrayofvaluesin
RowDataArraywillbeempty.Standard Indicatesthatanexistingrowisselected.Thearrayofvalues
inRowDataArraycontainvaluesfromeachcellintheselectedrow.
![Page 2314: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2314.jpg)
Remarks
IfthiseventfiresasaresultofloadinganewXMLSpreadsheetfileorXMLdataintothecontrol,thevalueoftheSelectionStatusparameterwillbe"None".TheSpreadsheetcomponentwillfiretheRowReadyeventanytimetheactivecellismovedtoadifferentrowinalist.TheRowReadyeventwillnotfireifauserclickswithinaselectedrow,orclicksoutsideofthelist,andthenselectsmultiplerowswithinthelist.
![Page 2315: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2315.jpg)
ExampleThefollowingexampleusestheRowReadyeventproceduretoworkwiththeinformationcontainedintheeventprocedureparameters:
SubSpreadsheet1_RowReady(XDTName,RowDataArray,SelectionStatus)DimstrCellDataDimintItem
SelectCaseSelectionStatus Case"None" Case"New" Case"Standard" ForintItem=0toUBound(RowDataArray)-1 strCellData=RowDataArray(intItem)'Workwithdataincellsofselectedrowhere. NextCaseElse EndSelectEndSub
![Page 2316: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2316.jpg)
SelectionChangeEvent
Occurswhenevertheusermakesanewselection.Theusercannotcancelthisevent.
PrivateSubObject_SelectionChange()
ObjectThenameoftheChartSpace,PivotTable,orSpreadsheetobjectthatthiseventappliesto.
![Page 2317: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2317.jpg)
RemarksForinformationaboutusingeventswithVBScript,seeDeclaringandUsingEventProceduresinVBScript.
YoucanusetheSelectionpropertytodeterminetheobjecttypeofthecurrentselection,asshowninthefollowingexample.
PrivateSubPivotTable_SelectionChange()IfTypeName(PivotTable.Selection)="PivotTotal"Then'HandleselectionofatotalhereEndIfEndSub
![Page 2318: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2318.jpg)
SelectionChangingEvent
Occurswhenevertheusermovesthemousepointerwhileselectingarange.Thiseventdoesnotoccurwhentheuserselectsarangebyusingthekeyboard.Theusercannotcancelthisevent.
PrivateSubObject_SelectionChanging(ByValRangeAsRange)
ObjectThenameoftheSpreadsheetobjectthatyouaretrappingthiseventfor.
RangeARangeobjectthatrepresentstherangeofcellsthatarebeingselected.
![Page 2319: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2319.jpg)
RemarksForinformationaboutusingeventswithVBScript,seeDeclaringandUsingEventProceduresinVBScript.
![Page 2320: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2320.jpg)
SheetActivateEvent
Occurswhenaworksheetisactivated.
PrivateSubObject_SheetActivate(ByValShAsWorksheet)
ObjectThenameoftheSpreadsheetobjectthatyouaretrappingthiseventfor.
ShRequiredWorksheet.Theworksheetthathasbeenactivated.
![Page 2321: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2321.jpg)
RemarksWhenauserchangesworksheets,theSheetDeactivateeventiscalledbeforetheSheetActivateevent.
![Page 2322: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2322.jpg)
ExampleThisexampledisplaysthenameoftheactivatedworksheeteachtimethataworksheetisactivatedinSpreadsheet1.
SubSpreadsheet1_SheetActivate(Sh)
MsgBoxSh.Name
EndSub
![Page 2323: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2323.jpg)
SheetCalculateEvent
Occursafteranyworksheethasbeencalculated.
PrivateSubObject_SheetCalculate(ByValShAsWorksheet)
ObjectThenameoftheSpreadsheetobjectthatyouaretrappingthiseventfor.
ShAWorksheetobjectthatrepresentstheworksheetthatwascalculated.
![Page 2324: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2324.jpg)
ExampleThisexampleusestheSheetCalculateeventtomonitorthestatusofthevalueincellA5inSheet1ofSpreadsheet1.
SubSpreadsheet1_SheetCalculate(Sh)
DimrngRangeToWatch
'Setavariabletothecellthatyouwanttowatch.SetrngRangeToWatch=Spreadsheet1.Worksheets("Sheet1").Range("A5")
'IfthecalculatedsheetisSheet1...IfSh.Name="Sheet1"Then
'...andthevalueofthecelltowatchislessthant10...IfrngRangeToWatch.Value<10Then
'...alerttheuserofthestatus.MsgBox"Inventoryislessthan10.Reorderthepart."EndIf
EndIf
EndSub
![Page 2325: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2325.jpg)
SheetChangeEvent
Occurswhencellsinanyworksheetarechangedbytheuserorbyanexternallink.
PrivateSubObject_SheetChange(ByValShAsObject,ByValTargetAsRange)
ObjectThenameoftheSpreadsheetobjectthatyouaretrappingthiseventfor.
ShAWorksheetobjectthatrepresentsthesheet.
TargetARangeobjectthatrepresentsthechangedrange.
![Page 2326: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2326.jpg)
ExampleThisexampleillustrateshowtousetheSheetChangeeventtoperformconditionalformattingoncellsA1:10inSheet1ofSpreadsheet1.
SubSpreadsheet1_SheetChange(Sh,Target)DimrngIntersectDimrngCondFormat
'Setavariabletotherangetobeconditionallyformatted.Inthis'case,therangeiscellsA1:A10onSheet1.SetrngCondFormat=Spreadsheet1.Worksheets("Sheet1").Range("A1:A10")
'ChecktoseeifthechangewasmadeonSheet1.IfSh.Name="Sheet1"Then
'Setavariabletotheintersectionofthechangedcell'andtheconditionalformattingrange.SetrngIntersect=Spreadsheet1.RectIntersect(Target,rngCondFormat)
'Checktoseeifthechangedcellintersectswiththe'conditionalformattingrange.IfNotrngIntersectIsNothingThen
'Formatthetargetcellbasedonitsvalue.SelectCaseTarget.Value
CaseIs>=25Target.Font.Color="Green"Target.Font.Bold=TrueTarget.Font.Italic=FalseCaseIs>=10
![Page 2327: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2327.jpg)
Target.Font.Color="Blue"Target.Font.Bold=FalseTarget.Font.Italic=TrueCaseIs<10Target.Font.Color="Red"Target.Font.Bold=TrueTarget.Font.Italic=FalseEndSelectEndIfEndIfEndSub
![Page 2328: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2328.jpg)
SheetDeactivateEvent
Occurswhenaworksheetisdeactivated.
PrivateSubObject_SheetDeactivate(ByValShAsWorksheet)
ObjectThenameoftheSpreadsheetobjectthatyouaretrappingthiseventfor.
ShRequiredWorksheet.Theworksheetthathasbeendeactivated.
![Page 2329: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2329.jpg)
RemarksWhenauserchangesworksheets,thiseventiscalledbeforetheSheetActivateevent.
![Page 2330: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2330.jpg)
ExampleThisexampledisplaysthenameofthedeactivatedworksheeteachtimethataworksheetisdeactivatedinSpreadsheet1.
SubSpreadsheet1_SheetDeactivate(Sh)
MsgBoxSh.Name&"wasjustdeactivated."
EndSub
![Page 2331: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2331.jpg)
SheetFollowHyperlinkEvent
Occurswhenahyperlinkisclicked.
PrivateSubobject_SheetFollowHyperlink(ByValShAsWorksheet,TargetAsHyperlink)
objectRequired.ThenameofaSpreadsheetobjectthatyouaretrappingthiseventfor.
ShRequired.Theworksheetthathasbeendeactivated.
TargetRequired.Thehyperlinkthathasbeenclicked.
![Page 2332: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2332.jpg)
ExampleThisexamplekeepsalogofhyperlinksclickedinSpreadsheet1.ThenameofthesheetcontainingthehyperlinkandthetargetaddressarewrittentoSheet3eachtimethatahyperlinkisclicked.
SubSpreadsheet1_SheetFollowHyperlink(Sh,Target)
DimssConstantsDimrngNewItemDimshtListSheet
SetssConstants=Spreadsheet1.Constants
'SetavariabletoSheet3.SetshtListSheet=Spreadsheet1.ActiveWorkbook.Worksheets("Sheet3")
'SetavariabletothefirstavailablecellincolumnAofSheet3.SetrngNewItem=shtListSheet.Range("A262144").End(ssConstants.xlUp).Offset(1,0)
'WritethenameofthesheettoColumnAofSheet3.rngNewItem.Value=Sh.Name
'WritethetargetaddressofthehyperlinktoColumnBofSheet3.rngNewItem.Offset(0,1).Value=Target.Address
EndSub
![Page 2333: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2333.jpg)
ShowAll
![Page 2334: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2334.jpg)
StartEditEvent
StartEditeventasitappliestotheSpreadsheetobject.
StartEditEventasitappliestothePivotTableobject.
![Page 2335: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2335.jpg)
RemarksForinformationaboutusingeventswithVBScript,seeDeclaringandUsingEventProceduresinVBScript.
![Page 2336: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2336.jpg)
UndoEvent
OccurswhentheuserclickstheUndobuttononthenavigationcontrol,ortheDirtyeventiscanceled.Thiseventfiresbeforethedataisreturnedtoitsoriginalvalues.Usethiseventtosettheconditionsunderwhichtheuserisallowedtoundoachange.
PrivateSubObject_Undo(ByValDSCEventInfoAsDSCEventInfo)
ObjectADataSourceControlobject.
DSCEventInfoTheDSCEventInfoobjectthatcontainsinformationabouttheevent.
![Page 2337: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2337.jpg)
RemarksSettheReturnValuepropertyoftheDSCEventInfoobjecttoFalsetocanceltheundoaction.
YoucanusetheDataPageandSectionpropertiesoftheDSCEventInfoobjecttogetmoreinformationaboutthepage.
![Page 2338: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2338.jpg)
ShowAll
![Page 2339: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2339.jpg)
ViewChangeEvent
ViewChangeeventasitappliestotheChartSpaceobject.
ViewChangeeventasitappliestothePivotTableobject.
ViewChangeeventasitappliestotheSpreadsheetobject.
![Page 2340: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2340.jpg)
RemarksForinformationaboutusingeventswithVBScript,seeDeclaringandUsingEventProceduresinVBScript.
![Page 2341: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2341.jpg)
ShowAll
![Page 2342: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2342.jpg)
OfficeWebComponentsConstants
ThistopicprovidesalistofallconstantsintheOfficeWebComponentsobjectmodel.Forinformationonhowtousetheseconstants,seeUsingNamedConstantsinVBScript.
AddinClientTypeEnum
BindingLoadMode
Chart3DSurfaceEnum
ChartAxisCrossesEnum
ChartAxisGroupingEnum
ChartAxisPositionEnum
ChartAxisTypeEnum
ChartAxisUnitTypeEnum
ChartBoundaryValueTypeEnum
ChartChartLayoutEnum
ChartChartTypeEnum
ChartColorIndexEnum
ChartCommandIdEnum
ChartDataGroupingFunctionEnum
ChartDataLabelPositionEnum
ChartDataPointEnum
ChartDataSourceTypeEnum
ChartDimensionsEnum
ChartDrawModesEnum
ChartDropZonesEnum
ChartEndStyleEnum
![Page 2343: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2343.jpg)
ChartErrorBarCustomValuesEnum
ChartErrorBarDirectionEnum
ChartErrorBarIncludeEnum
ChartErrorBarTypeEnum
ChartFillStyleEnum
ChartFillTypeEnum
ChartGradientStyleEnum
ChartGradientVariantEnum
ChartGroupingTotalFunctionEnum
ChartLabelOrientationEnum
ChartLegendPositionEnum
ChartLineDashStyleEnum
ChartLineMiterEnum
ChartMarkerStyleEnum
ChartPatternTypeEnum
ChartPivotDataReferenceEnum
ChartPlotAggregatesEnum
ChartPresetGradientTypeEnum
ChartPresetTextureEnum
ChartProjectionModeEnum
ChartScaleOrientationEnum
ChartScaleTypeEnum
ChartSelectionMarksEnum
ChartSelectionsEnum
ChartSelectMode
ChartSeriesByEnum
![Page 2344: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2344.jpg)
ChartSizeRepresentsEnum
ChartSpecialDataSourcesEnum
ChartTextureFormatEnum
ChartTexturePlacementEnum
ChartTickMarkEnum
ChartTitlePositionEnum
ChartTrendlineTypeEnum
DefaultControlTypeEnum
DscAdviseTypeEnum
DscDisplayAlert
DscDropLocationEnum
DscDropTypeEnum
DscEncodingEnum
DscFetchTypeEnum
DscFieldTypeEnum
DscGroupOnEnum
DscHyperlinkPartEnum
DscJoinTypeEnum
DscLocationEnum
DscObjectTypeEnum
DscOfflineTypeEnum
DscPageRelTypeEnum
DscRecordsetTypeEnum
DscRowsourceTypeEnum
DscSaveAsEnum
DscStatusEnum
![Page 2345: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2345.jpg)
DscTotalTypeEnum
DscXMLLocationEnum
ExpandBitmapTypeEnum
LineStyleEnum
LineWeightEnum
MsoAppLanguageID
MsoLanguageID
NavButtonEnum
NotificationType
OCCommandId
PivotArrowModeEnum
PivotCaretPositionEnum
PivotCommandId
PivotDataReasonEnum
PivotEditModeEnum
PivotExportActionEnum
PivotFieldFilterFunctionEnum
PivotFieldGroupOnEnum
PivotFieldSetAllIncludeExcludeEnum
PivotFieldSetOrientationEnum
PivotFieldSetTypeEnum
PivotFieldSortDirectionEnum
PivotFieldTypeEnum
PivotFilterUpdateMemberStateEnum
PivotHAlignmentEnum
PivotMemberCustomGroupTypeEnum
![Page 2346: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2346.jpg)
PivotMemberFindFormatEnum
PivotMemberPropertyDisplayEnum
PivotMembersCompareByEnum
PivotScrollTypeEnum
PivotShowAsEnum
PivotTableExpandEnum
PivotTableReasonEnum
PivotTotalFunctionEnum
PivotTotalTypeEnum
PivotViewReasonEnum
PivotViewTotalOrientationEnum
ProviderType
SectTypeEnum
SheetCommandEnum
SheetExportActionEnum
SheetExportFormat
SheetFilterFunction
SpreadSheetCommandId
SynchronizationStatus
TipTypeEnum
UnderlineStyleEnum
XlApplicationInternational
XlBordersIndex
XlBorderWeight
XlCalculation
XlColorIndex
![Page 2347: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2347.jpg)
XlConstants
XlDeleteShiftDirection
XlDirection
XlFindLookIn
XlHAlign
XlInsertShiftDirection
XlLineStyle
XlLookAt
XlOrientation
XlRangeValueType
XlReadingOrder
XlReferenceStyle
XlSearchDirection
XlSearchOrder
XlSheetType
XlSheetVisibility
XlSortOrder
XlUnderlineStyle
XlVAlign
XlWindowType
XlYesNoGuess
![Page 2348: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2348.jpg)
TrendlinesProperty
ReturnstheChTrendlinescollectionforthespecifiedseries.Notethataseriescanhaveonlyonetrendline.
expression.Trendlines
expressionRequired.AnexpressionthatreturnsaChSeriesobject.
![Page 2349: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2349.jpg)
RemarksForinformationaboutreturningasinglememberofacollection,seeReturninganObjectfromaCollection.
![Page 2350: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2350.jpg)
ExampleThisexampleaddsatrendlinetothespecifiedseriesandthenhidesthetrendline’sR-squaredvalue.
SubAddTrendline()
DimserSeries1
'SetavariabletothefirstseriesinthefirstchartofChartspace1.SetserSeries1=ChartSpace1.Charts(0).SeriesCollection(0)
'Addatrendlinetotheseries.serSeries1.Trendlines.Add
'HidetheRSquaredvalueforthetrendline.serSeries1.Trendlines(0).IsDisplayingRSquared=False
EndSub
![Page 2351: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2351.jpg)
HasChartSpaceLegendProperty
Trueifthespecifiedchartworkspacehasalegend.Read/writeBoolean.
expression.HasChartSpaceLegend
expressionRequired.AnexpressionthatreturnsaChartSpaceobject.
![Page 2352: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2352.jpg)
RemarksSettingthispropertytoFalsecausesthelegendtobedeletedfromthechartworkspace.Whenthishappens,allcustomformattingislostandmustberesetifthepropertyissubsequentlysettoTrue.
![Page 2353: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2353.jpg)
ExampleThisexamplesetsthechartworkspacetitleandpositionsthechartworkspacelegendontheleftsideoftheworkspace.
SubFormat_ChartSpace()DimchConstantsSetchConstants=ChartSpace1.Constants'Enablethetitleforthechartspace.ChartSpace1.HasChartSpaceTitle=True
'Setthechartspacetitle.ChartSpace1.ChartSpaceTitle.Caption="MonthlySalesData"'Enablethelegendforthechartspace.ChartSpace1.HasChartSpaceLegend=True
'Specifythepositionofthechartspacelegend.ChartSpace1.ChartSpaceLegend.Position=chConstants.chLegendPositionLeftEndSub
![Page 2354: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2354.jpg)
ChartSpaceLegendProperty
ReturnsaChLegendobjectthatrepresentsthechartworkspacelegend.Usethispropertytosetthepropertiesforthechartworkspacelegend.NotethattheChartSpaceLegendpropertyrepresentsthelegendfortheentirechartworkspace.UsetheLegendpropertyoftheChChartobjecttosetthelegendforindividualchartswithinthechartworkspace.ReturnsNothingifthechartworkspacedoesnothavealegend.Read-only.
expression.ChartSpaceLegend
expressionRequired.AnexpressionthatreturnsaChartSpaceobject.
![Page 2355: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2355.jpg)
ExampleThisexamplesetsthechartworkspacetitleandpositionsthechartworkspacelegendontheleftsideoftheworkspace.
SubSetLegend()DimchConstantsSetchConstants=ChartSpace1.Constants'Enablethetitleforthechartworkspace.ChartSpace1.HasChartSpaceTitle=True'Setthetitleforthechartworkspace.ChartSpace1.ChartSpaceTitle.Caption="MonthlySalesData"'Enablethelegendforthechartworkspace.ChartSpace1.HasChartSpaceLegend=True'Positionthelegendforthechartworkspace.ChartSpace1.ChartSpaceLegend.Position=chConstants.chLegendPositionLeftEndSub
![Page 2356: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2356.jpg)
HasChartSpaceTitleProperty
Trueifthespecifiedchartworkspacehasatitle.Read/writeBoolean.
expression.HasChartSpaceTitle
expressionRequired.AnexpressionthatreturnsaChartSpaceobject.
![Page 2357: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2357.jpg)
RemarksSettingthispropertytoFalsecausesthetitletobedeletedfromthechartworkspace.Whenthishappens,allcustomformattingislostandmustberesetifthepropertyissubsequentlysettoTrue.
![Page 2358: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2358.jpg)
ExampleThisexamplesetsthechartworkspacetitleandpositionsthechartworkspacelegendontheleftsideoftheworkspace.
SubFormat_ChartSpace()DimchConstantsSetchConstants=ChartSpace1.Constants'Enablethetitleforthechartspace.ChartSpace1.HasChartSpaceTitle=True
'Setthechartspacetitle.ChartSpace1.ChartSpaceTitle.Caption="MonthlySalesData"'Enablethelegendforthechartspace.ChartSpace1.HasChartSpaceLegend=True
'Specifythepositionofthechartspacelegend.ChartSpace1.ChartSpaceLegend.Position=chConstants.chLegendPositionLeftEndSub
![Page 2359: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2359.jpg)
ChartSpaceTitleProperty
ReturnsaChTitleobjectthatrepresentsthechartworkspacetitle.Usethispropertytosetthepropertiesforthechartworkspacetitle.NotethattheChartSpaceTitlepropertyrepresentsthetitlefortheentirechartworkspace.UsetheTitlepropertyoftheChChartobjecttosetthetitleforindividualchartswithinthechartworkspace.ReturnsNothingifthechartworkspacedoesnothaveatitle.Read-only.
expression.ChartSpaceTitle
expressionRequired.AnexpressionthatreturnsaChartSpaceobject.
![Page 2360: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2360.jpg)
ExampleThisexamplesetsthechartworkspacetitleandpositionsthechartworkspacelegendontheleftsideoftheworkspace.
SubSetLegend()DimchConstantsSetchConstants=ChartSpace1.Constants'Enablethetitleforthechartworkspace.ChartSpace1.HasChartSpaceTitle=True'Setthetitleforthechartworkspace.ChartSpace1.ChartSpaceTitle.Caption="MonthlySalesData"'Enablethelegendforthechartworkspace.ChartSpace1.HasChartSpaceLegend=True'Positionthelegendforthechartworkspace.ChartSpace1.ChartSpaceLegend.Position=chConstants.chLegendPositionLeftEndSub
![Page 2361: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2361.jpg)
XProperty
ReturnsaLongthatrepresentstheX-coordinateofthedatapointcurrentlystoredintheCoordinateobject.Read-only.
expression.x
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 2362: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2362.jpg)
RemarksUsetheValueToPointmethodtoreturnthecoordinatesofadatapointtoaCoordinateobject.
UsetheypropertytoreturntheY-coordinateofthedatapointcurrentlystoredintheCoordinateobject.
![Page 2363: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2363.jpg)
ExampleThisexamplechangesthetitleofthefirstchartinChartspace1tothepixelcoordinatesofadatapointinthefirstseriesofthechart.
SubGetPixelCoordinates()
DimchChart1DimlXPosDimlYPosDimcoPointCoordinates
'SetavariabletothefirstchartinChartspace1.SetchChart1=ChartSpace1.Charts(0)
'Enablethetitleforthechart.chChart1.HasTitle=True
'SetaCoordinateobjecttothecoordinatesofadatapoint.SetcoPointCoordinates=chChart1.SeriesCollection(0).ValueToPoint("Pears",10)
'SetavariabletotheX-coordinate.lXPos=coPointCoordinates.x
'SetavariabletotheY-coordinate.lYPos=coPointCoordinates.y
'Setthechart'stitlestothepixelcoordinatesofthespecified'datapoint.chChart1.Title.Caption="X("&lXPos&")Y("&lYPos&")"
EndSub
![Page 2364: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2364.jpg)
YProperty
ReturnsaLongthatrepresentstheYcoordinateofthedatapointcurrentlystoredintheCoordinateobject.Read-only.
expression.y
expressionRequired.AnexpressionthatreturnsoneoftheobjectsintheAppliesTolist.
![Page 2365: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2365.jpg)
RemarksUsetheValueToPointmethodtoreturnthecoordinatesofadatapointtoaCoordinateobject.
UsethexpropertytoreturntheXcoordinateofthedatapointcurrentlystoredintheCoordinateobject.
![Page 2366: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2366.jpg)
ExampleThisexamplechangesthetitleofthefirstchartinChartspace1tothepixelcoordinatesofadatapointinthefirstseriesofthechart.
SubGetPixelCoordinates()
DimchChart1DimlXPosDimlYPosDimcoPointCoordinates
'SetavariabletothefirstchartinChartspace1.SetchChart1=ChartSpace1.Charts(0)
'Enablethetitleforthechart.chChart1.HasTitle=True
'SetaCoordinateobjecttothecoordinatesofadatapoint.SetcoPointCoordinates=chChart1.SeriesCollection(0).ValueToPoint("Pears",10)
'SetavariabletotheX-coordinate.lXPos=coPointCoordinates.x
'SetavariabletotheY-coordinate.lYPos=coPointCoordinates.y
'Setthechart'stitlestothepixelcoordinatesofthespecified'datapoint.chChart1.Title.Caption="X("&lXPos&")Y("&lYPos&")"
EndSub
![Page 2367: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2367.jpg)
ReturninganObjectfromaCollection
TheItempropertyreturnsasingleobjectfromacollection.ThefollowingexamplesetsthevariablethisCharttoaChChartobjectthatrepresentschartone.
SetthisChart=ChartWorkspace1.Charts.Item(1)
TheItempropertyisthedefaultpropertyformostcollections,soyoucanwritethesamestatementmoreconciselybyomittingtheItemkeyword.
SetthisChart=ChartWorkspace1.Charts(1)
SomecollectionsuseanenumeratedtypewiththeirItempropertytoreturnspecificmembersofthecollection.Forexample,theChAxescollectionusestheChartAxisPositionEnumenumeratedtype,asshowninthefollowingexample.
SetchConstants=ChartSpace1.ConstantsSetvalueAxis=ChartSpace1.Charts(0).Axes.Item(chConstants.chAxisPositionLeft)SetcategoryAxis=ChartSpace1.Charts(0).Axes.Item(chConstants.chAxisPositionBottom)
Again,youcanomittheItemkeyword,asshowninthefollowingexample.
SetchConstants=ChartSpace1.ConstantsSetvalueAxis=ChartSpace1.Charts(0).Axes(chConstants.chAxisPositionLeft)SetcategoryAxis=ChartSpace1.Charts(0).Axes(chConstants.chAxisPositionBottom)
Formoreinformationaboutaspecificcollection,seetheHelptopicforthatcollection.
![Page 2368: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2368.jpg)
UsingNamedConstantsinVBScript
YoucannotusenamedconstantsinVBScriptcode.ThefollowingexampleworksinVisualBasicbutdoesnotworkinVBScript.
SetvalueAxis=ChartSpace1.Charts(0).Axes(chAxisPositionLeft)
VBScriptregardsthenamedconstantchAxisPositionLeftasjustanotheruninitializedvariable,soitsvalueis0(zero).BecausetheactualvalueofchAxisPositionLeftis–3,thiscodedoesnotworkasexpectedinVBScript.
TheConstantspropertyreturnsanobjectthatallowsVBScriptprogrammerstousenamedconstants.Thispropertyappliestoeachofthetop-levelcontainerobjects(ChartSpace,DataSourceControl,PivotTable,andSpreadsheet).ItreturnsanobjectthatcontainsallofthenamedconstantsavailableintheMicrosoftOfficeWebComponentstypelibrary(nomatterwhichobjecttheConstantspropertyisappliedto,italwaysreturnsthecompletesetofnamedconstants).
TousenamedconstantsinVBScript,youcansetanobjectvariabletotheobjectreturnedbytheConstantspropertyandthenusethatobjecttoqualifythenamedconstantsinyourcode,asshowninthefollowingexample.
SetchConstants=ChartSpace1.ConstantsSetvalueAxis=ChartSpace1.Charts(0).Axes(chConstants.chAxisPositionLeft)
YoucanalsousetheConstantspropertydirectlyinanexpression,asshowninthefollowingexample.
Spreadsheet1.ActiveSheet.Export"sstest.xls",Spreadsheet1.Constants.ssExportActionNone
NoteYoucanusetheConstantspropertyinVisualBasic,butitis
![Page 2369: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2369.jpg)
neitherrequirednorrecommended.UsingtheConstantspropertyincontainerswhereitisnotrequiredwillcauseyourcodetorunsignificantlyslower.
![Page 2370: Microsoft Office 2003 Web Components Visual Basic Reference · (MSDN) Web site for the latest information about programming with Microsoft Office 2003 Web Components, including product](https://reader031.vdocument.in/reader031/viewer/2022011909/5f669020fd80881d61223023/html5/thumbnails/2370.jpg)
DeclaringandUsingEventProceduresinVBScript
YoudeclareeventproceduresinVisualBasicbyusingthePrivateandByValkeywordsandargumentswithexplicittypedeclarations,asshowninthefollowingexample.
PrivateSubSpreadsheet1_MouseOver(ByValButtonAsLong,ByValShiftAsLong,ByValTargetAsRange)
ThisproceduredeclarationwillnotworkinVBScriptbecauseVBScriptdoesnotusethesekeywordsandbecauseallargumentsarepassedasVariant.Instead,youdeclareeventproceduresinVBScriptsimplybyusingtheeventnameandargumentnames,asshowninthefollowingexample.
SubSpreadsheet1_MouseOver(Button,Shift,Target)
Theargumentnamesthemselvesaresimplyaconventioninanycontainer(youcoulduseanyargumentnames).
CautionSomescripteditors(includingMicrosoftScriptEditor)donotfillintheargumentlistwhentheycreateaneventprocedure.Toensurethatyoureventprocedurerunscorrectly,consulttheObjectBrowserortheappropriateeventtopicinHelp,andfillintheargumentlistyourself.