欧美性猛交XXXX免费看蜜桃,成人网18免费韩国,亚洲国产成人精品区综合,欧美日韩一区二区三区高清不卡,亚洲综合一区二区精品久久

打開(kāi)APP
userphoto
未登錄

開(kāi)通VIP,暢享免費電子書(shū)等14項超值服

開(kāi)通VIP
Excel VBA教程:Item屬性

應用于 Adjustments對象的 Item屬性。

返回或設置由 Index參數指定的調整值。對于線(xiàn)性調整,調整值 0.0 通常對應于圖形的左邊緣或上邊緣,而值 1.0 通常對應于圖形的右邊緣或下邊緣。但是,對于某些圖形,調整可超過(guò)圖形的邊界。對于輻射調整,調整值 1.0對應于圖形的寬度。對于角度調整,調整值是以度為單位指定的。Item屬性?xún)H應用于可調整的圖形。Single 類(lèi)型,可讀寫(xiě)。

expression.Item(Index)

expression   必需。該表達式返回一個(gè) Adjustments對象。

Index   Long 類(lèi)型,必需。調整的索引號。

說(shuō)明

自選圖形、連接符和藝術(shù)字對象最多可進(jìn)行八次調整。

應用于 Areas、Filters、HPageBreaks、Panes、Phonetics、RecentFiles 和 VPageBreaks對象的 Item屬性。

返回一個(gè)集合的單個(gè)對象。

expression.Item(Index)

expression   必需。該表達式返回上面的對象之一。

Index   Long 類(lèi)型,必需。對象的索引號。

應用于 Borders對象的 Item屬性。

返回一個(gè)Border對象,該對象代表單元格區域或樣式的某一邊框。

expression.Item(Index)

expression   必需。該表達式返回一個(gè) Borders集合。

Index  XlBordersIndex 類(lèi)型,必需。

XlBordersIndex 可為以下 XlBordersIndex 常量之一。
xlDiagonalDown
xlDiagonalUp
xlEdgeBottom
xlEdgeLeft
xlEdgeRight
xlEdgeTop
xlInsideHorizontal
xlInsideVertical

應用于 Dialogs對象的 Item屬性。

返回一個(gè)Dialog對象,該對象代表單個(gè)內置對話(huà)框。

expression.Item(Index)

expression   必需。該表達式返回一個(gè) Dialogs對象。

Index  XlBuiltInDialog 類(lèi)型,必需。

XlBuiltInDialog 可為以下 XlBuiltInDialog 常量之一。
_xlDialogChartSourceData
_xlDialogPhonetic
xlDialogActivate
xlDialogActiveCellFont
xlDialogAddChartAutoformat
xlDialogAddinManager
xlDialogAlignment
xlDialogApplyNames
xlDialogApplyStyle
xlDialogAppMove
xlDialogAppSize
xlDialogArrangeAll
xlDialogAssignToObject
xlDialogAssignToTool
xlDialogAttachText
xlDialogAttachToolbars
xlDialogAutoCorrect
xlDialogAxes
xlDialogBorder
xlDialogCalculation
xlDialogCellProtection
xlDialogChangeLink
xlDialogChartAddData
xlDialogChartLocation
xlDialogChartOptionsDataLabelMultiple
xlDialogChartOptionsDataLabels
xlDialogChartOptionsDataTable
xlDialogChartSourceData
xlDialogChartTrend
xlDialogChartType
xlDialogChartWizard
xlDialogCheckboxProperties
xlDialogClear
xlDialogColorPalette
xlDialogColumnWidth
xlDialogCombination
xlDialogConditionalFormatting
xlDialogConsolidate
xlDialogCopyChart
xlDialogCopyPicture
xlDialogCreateNames
xlDialogCreatePublisher
xlDialogCustomizeToolbar
xlDialogCustomViews
xlDialogDataDelete
xlDialogDataLabel
xlDialogDataLabelMultiple
xlDialogDataSeries
xlDialogDataValidation
xlDialogDefineName
xlDialogDefineStyle
xlDialogDeleteFormat
xlDialogDeleteName
xlDialogDemote
xlDialogDisplay
xlDialogEditboxProperties
xlDialogEditColor
xlDialogEditDelete
xlDialogEditionOptions
xlDialogEditSeries
xlDialogErrorbarX
xlDialogErrorbarY
xlDialogErrorChecking
xlDialogEvaluateFormula
xlDialogExternalDataProperties
xlDialogExtract
xlDialogFileDelete
xlDialogFileSharing
xlDialogFillGroup
xlDialogFillWorkgroup
xlDialogFilter
xlDialogFilterAdvanced
xlDialogFindFile
xlDialogFont
xlDialogFontProperties
xlDialogFormatAuto
xlDialogFormatChart
xlDialogFormatCharttype
xlDialogFormatFont
xlDialogFormatLegend
xlDialogFormatMain
xlDialogFormatMove
xlDialogFormatNumber
xlDialogFormatOverlay
xlDialogFormatSize
xlDialogFormatText
xlDialogFormulaFind
xlDialogFormulaGoto
xlDialogFormulaReplace
xlDialogFunctionWizard
xlDialogGallery3dArea
xlDialogGallery3dBar
xlDialogGallery3dColumn
xlDialogGallery3dLine
xlDialogGallery3dPie
xlDialogGallery3dSurface
xlDialogGalleryArea
xlDialogGalleryBar
xlDialogGalleryColumn
xlDialogGalleryCustom
xlDialogGalleryDoughnut
xlDialogGalleryLine
xlDialogGalleryPie
xlDialogGalleryRadar
xlDialogGalleryScatter
xlDialogGoalSeek
xlDialogGridlines
xlDialogImportTextFile
xlDialogInsert
xlDialogInsertHyperlink
xlDialogInsertNameLabel
xlDialogInsertObject
xlDialogInsertPicture
xlDialogInsertTitle
xlDialogItemProperties
xlDialogLabelProperties
xlDialogListboxProperties
xlDialogMacroOptions
xlDialogMailEditMailer
xlDialogMailLogon
xlDialogMailNextLetter
xlDialogMainChart
xlDialogMainChartType
xlDialogMenuEditor
xlDialogMove
xlDialogNew
xlDialogNewWebQuery
xlDialogNote
xlDialogObjectProperties
xlDialogObjectProtection
xlDialogOpen
xlDialogOpenLinks
xlDialogOpenMail
xlDialogOpenText
xlDialogOptionsCalculation
xlDialogOptionsChart
xlDialogOptionsEdit
xlDialogOptionsGeneral
xlDialogOptionsListsAdd
xlDialogOptionsME
xlDialogOptionsTransition
xlDialogOptionsView
xlDialogOutline
xlDialogOverlay
xlDialogOverlayChartType
xlDialogPageSetup
xlDialogParse
xlDialogPasteNames
xlDialogPasteSpecial
xlDialogPatterns
xlDialogPhonetic
xlDialogPivotCalculatedField
xlDialogPivotCalculatedItem
xlDialogPivotClientServerSet
xlDialogPivotFieldGroup
xlDialogPivotFieldProperties
xlDialogPivotFieldUngroup
xlDialogPivotShowPages
xlDialogPivotSolveOrder
xlDialogPivotTableOptions
xlDialogPivotTableWizard
xlDialogPlacement
xlDialogPrint
xlDialogPrinterSetup
xlDialogPrintPreview
xlDialogPromote
xlDialogProperties
xlDialogProtectDocument
xlDialogProtectSharing
xlDialogPublishAsWebPage
xlDialogPushbuttonProperties
xlDialogReplaceFont
xlDialogRoutingSlip
xlDialogRowHeight
xlDialogRun
xlDialogSaveAs
xlDialogSaveCopyAs
xlDialogSaveNewObject
xlDialogSaveWorkbook
xlDialogSaveWorkspace
xlDialogScale
xlDialogScenarioAdd
xlDialogScenarioCells
xlDialogScenarioEdit
xlDialogScenarioMerge
xlDialogScenarioSummary
xlDialogScrollbarProperties
xlDialogSearch
xlDialogSelectSpecial
xlDialogSendMail
xlDialogSeriesAxes
xlDialogSeriesOptions
xlDialogSeriesOrder
xlDialogSeriesShape
xlDialogSeriesX
xlDialogSeriesY
xlDialogSetBackgroundPicture
xlDialogSetPrintTitles
xlDialogSetUpdateStatus
xlDialogShowDetail
xlDialogShowToolbar
xlDialogSize
xlDialogSort
xlDialogSortSpecial
xlDialogSplit
xlDialogStandardFont
xlDialogStandardWidth
xlDialogStyle
xlDialogSubscribeTo
xlDialogSubtotalCreate
xlDialogSummaryInfo
xlDialogTable
xlDialogTabOrder
xlDialogTextToColumns
xlDialogUnhide
xlDialogUpdateLink
xlDialogVbaInsertFile
xlDialogVbaMakeAddin
xlDialogVbaProcedureDefinition
xlDialogView3d
xlDialogWebOptionsBrowsers
xlDialogWebOptionsEncoding
xlDialogWebOptionsFiles
xlDialogWebOptionsFonts
xlDialogWebOptionsGeneral
xlDialogWebOptionsPictures
xlDialogWindowMove
xlDialogWindowSize
xlDialogWorkbookAdd
xlDialogWorkbookCopy
xlDialogWorkbookInsert
xlDialogWorkbookMove
xlDialogWorkbookName
xlDialogWorkbookNew
xlDialogWorkbookOptions
xlDialogWorkbookProtect
xlDialogWorkbookTabSplit
xlDialogWorkbookUnhide
xlDialogWorkgroup
xlDialogWorkspace
xlDialogZoom

說(shuō)明

使用 Dialogs集合的 Item屬性以及 Show方法可顯示大約 200 個(gè)內置對話(huà)框。每個(gè)對話(huà)框都有一個(gè)常量與之對應,這些常量均以“xlDialog”開(kāi)頭。

有關(guān)可用常量及其相應參數的列表的詳細信息,請參閱內置對話(huà)框參數表。

如果試圖在不正確的上下文中顯示對話(huà)框,則 Dialogs集合的 Item屬性可能會(huì )失效。例如,若要顯示“數據標簽”對話(huà)框(使用 Visual Basic 表達式Application.Dialogs(xlDialogDataLabel).Show),那么活動(dòng)工作表就必須是圖表,否則該屬性無(wú)效。

應用于 Error對象的 Item屬性。

返回 Error對象的單個(gè)成員。

expression.Item(Index)

expression   必需。該表達式返回一個(gè) Errors對象。

Index   Variant 類(lèi)型,必需。Index 也可以是這些常量之一。

xlEvaluateToError  單元格計算為錯誤值。
xlTextDate  單元格包含用 2 位數表示年份的文本日期。
xlNumberAsText  單元格包含以文本形式存儲的數字。
xlInconsistentFormula  單元格包含一個(gè)區域中不一致的公式。
xlOmittedCells  單元格包含一個(gè)省略了區域中某個(gè)單元格的公式。
xlUnlockedFormulaCells  取消鎖定的單元格包含一個(gè)公式。
xlEmptyCellReferences  單元格包含一個(gè)引用空單元格的公式。

應用于 Range對象的 Item屬性。

返回一個(gè)Range對象,該對象代表對指定區域某一偏移量處的區域。

expression.Item(RowIndex, ColumnIndex)

expression   必需。該表達式返回一個(gè) Range對象。

RowIndex   Variant 類(lèi)型,必需。要訪(fǎng)問(wèn)的單元格的索引號,順序為從左到右,再往下。Range.Item(1) 返回區域左上角的單元格,Range.Item(2) 返回緊靠左上角單元格右邊的單元格。

ColumnIndex   Variant 類(lèi)型,可選。指明要訪(fǎng)問(wèn)的單元格所在列的列號的數字或字符串,1 或 “A”表示區域中的第一列。

說(shuō)明

語(yǔ)法 1 使用行號和列號或列標作為索引參數。關(guān)于此語(yǔ)法的詳細信息,請參閱Range對象。RowIndex 和 ColumnIndex參數為相對偏移量。也就是說(shuō),如果 RowIndex 指定為 1,將返回區域內第一行中的單元格,而非工作表的第一行。例如,如果選定區域為單元格 C3,則Selection.Cells(2, 2) 返回單元格 D4(可用 Item屬性在原始區域之外進(jìn)行索引)。

應用于“應用于”列表中的其他所有對象的 Item屬性。

返回一個(gè)集合的單個(gè)對象。

expression.Item(Index)

expression   必需。該表達式返回上面的對象之一。

Index   Variant 類(lèi)型,必需。對象的名稱(chēng)或索引號。

說(shuō)明

有關(guān)返回集合中單個(gè)成員的詳細信息,請參閱返回集合中的對象。

VBA示例

應用于 AddIns對象。

本示例顯示“分析工具庫”加載宏的狀態(tài)。請注意,用作 AddIns方法索引的字符串就是 AddIn對象的 Title屬性。

If AddIns.Item("Analysis ToolPak").Installed = True Then            MsgBox "Analysis ToolPak add-in is installed"        Else            MsgBox "Analysis ToolPak add-in is not installed"        End If

應用于 AllowEditRanges對象。

本示例允許編輯活動(dòng)的工作表上的區域 A1:A4,并通知用戶(hù),然后更改該指定區域的密碼并將更改通知用戶(hù)。

Sub UseChangePassword()        Dim wksOne As Worksheet        Set wksOne = Application.ActiveSheet        ' Establish a range that can allow edits        ' on the protected worksheet.        wksOne.Protection.AllowEditRanges.Add _        Title:="Classified", _        Range:=Range("A1:A4"), _        Password:="secret"        MsgBox "Cells A1 to A4 can be edited on the protected worksheet."        ' Change the password.        wksOne.Protection.AllowEditRanges.Item(1).ChangePassword _        Password:="moresecret"        MsgBox "The password for these cells has been changed."        End Sub

應用于 Areas對象。

本示例檢查當前選定區域是否為多重選定區域,如果是,則清除其中的第一個(gè)子區域的內容。

If Selection.Areas.Count <> 1 Then            Selection.Areas.Item(1).Clear        End If

應用于 Borders對象。

下例設置單元格區域 A1:G1 的底部邊界的顏色。

Worksheets("Sheet1").Range("a1:g1"). _            Borders.Item(xlEdgeBottom).Color = RGB(255, 0, 0)

應用于 CalculatedMembers對象。

下例通知用戶(hù)計算成員是否有效。本示例假定數據透視表位于活動(dòng)的工作表上,該活動(dòng)工作表包含有效或無(wú)效的計算成員。

Sub CheckValidity()        Dim pvtTable As PivotTable        Dim pvtCache As PivotCache        Set pvtTable = ActiveSheet.PivotTables(1)        Set pvtCache = Application.ActiveWorkbook.PivotCaches.Item(1)        ' Handle run-time error if external source is not an OLEDB data source.        On Error GoTo Not_OLEDB        ' Check connection setting and make connection if necessary.        If pvtCache.IsConnected = False Then        pvtCache.MakeConnection        End If        ' Check if calculated member is valid.        If pvtTable.CalculatedMembers.Item(1).IsValid = True Then        MsgBox "The calculated member is valid."        Else        MsgBox "The calculated member is not valid."        End If        End Sub

應用于 Charts對象。

本示例對 Chart1 中的趨勢線(xiàn)向前和向后延伸的單位數進(jìn)行設置。本示例應在包含單個(gè)帶趨勢線(xiàn)系列的二維柱形圖上運行。

With Charts.Item("Chart1").SeriesCollection(1).Trendlines(1)            .Forward = 5            .Backward = .5        End With

應用于 CubeFields對象。

本示例查找第一個(gè)數據透視表(其中第一個(gè)多維數據集字段名中包含“Paris”字符串)。如果查找到該名稱(chēng),則 Boolean 變量blnFoundName 將設置為 True。

blnFoundName = False        For Each objPT in ActiveSheet.PivotTables        Set objCubeField = _        objPT.CubeFields.Item(1)        If instr(1,objCubeField.Name, "Paris") <> 0 Then        blnFoundName = True        Exit For        End If        Next objPT

應用于 CustomProperties對象。

下例演示該功能。在本示例中,Microsoft Excel 向活動(dòng)工作表添加標識符信息,并向用戶(hù)返回名稱(chēng)和值。

Sub CheckCustomProperties()        Dim wksSheet1 As Worksheet        Set wksSheet1 = Application.ActiveSheet        ' Add metadata to worksheet.        wksSheet1.CustomProperties.Add _        Name:="Market", Value:="Nasdaq"        ' Display metadata.        With wksSheet1.CustomProperties.Item(1)        MsgBox .Name & vbTab & .Value        End With        End Sub

應用于 Dialogs對象。

本示例顯示“打開(kāi)”對話(huà)框,并選定“只讀”選項。

Application.Dialogs.Item(xlDialogOpen).Show arg3:=True

應用于 Filters對象。

下例將變量設為工作表 Crew 上篩選區域中第一列的篩選的 On屬性值。

Set w = Worksheets("Crew")        If w.AutoFilterMode Then            filterIsOn = w.AutoFilter.Filters.Item(1).On        End If

應用于 HPageBreaks對象。

本示例更改第一個(gè)水平分頁(yè)符的位置。

Worksheets(1).HPageBreaks.Item(1).Location = .Range("e5")

應用于 Hyperlinks對象。

下例激活 E5 單元格的第一個(gè)超鏈接。

Worksheets(1).Range("E5").Hyperlinks.Item(1).Follow

應用于 Panes對象。

本示例拆分第一張工作表所在的窗口,然后滾動(dòng)窗口左下角的窗格,直至第五行到達此窗格的頂部。

Worksheets(1).Activate        ActiveWindow.Split = True        ActiveWindow.Panes.Item(3).ScrollRow = 5

應用于 Phonetics對象。

本示例使活動(dòng)單元格中的第一個(gè)拼音文本字符串可見(jiàn)。

ActiveCell.Phonetics.Item(1).Visible = True

應用于 PublishObjects對象。

本示例從某個(gè) <DIV> 標記中獲取標識符,并在名為 q198.htm 的 Web 頁(yè)(通過(guò)保存某個(gè)工作簿得到的)中查找該行。然后,本示例還創(chuàng )建該 Web 頁(yè)的一個(gè)副本 (newq1.htm),并在該副本的 <DIV> 標記前插入一個(gè)注釋行。

strTargetDivID = ActiveWorkbook.PublishObjects.Item(1).DivID        Open "\\server1\reports\q198.htm" For Input As #1        Open "\\server1\reports\newq1.htm" For Output As #2        While Not EOF(1)        Line Input #1, strFileLine        If InStr(strFileLine, strTargetDivID) > 0 And _        InStr(strFileLine, "<div") > 0 Then        Print #2, "<!--Saved item-->"        End If        Print #2, strFileLine        Wend        Close #2        Close #1

應用于 Range對象。

本示例基于單元格 A1 的內容填寫(xiě) Sheet1 的單元格區域 A1:A10。

Worksheets("Sheet1").Range.Item("A1:A10").FillDown

應用于 RecentFiles對象。

本示例打開(kāi)最近使用過(guò)的文件列表中的第二個(gè)文件。

Application.RecentFiles.Item(2).Open

應用于 Sheets對象。

本示例激活工作表 Sheet1。

Sheets.Item("sheet1").Activate

應用于 SmartTagRecognizer對象。

本示例將第一個(gè)智能標記標識符的全稱(chēng)通知給用戶(hù)。

MsgBox Application.SmartTagRecognizers.Item(1).FullName

應用于 Styles對象。

本示例通過(guò)設置“常規”樣式的 Bold屬性來(lái)更改活動(dòng)工作簿中的該樣式。

ActiveWorkbook.Styles.Item("Normal").Font.Bold = True

應用于 VPageBreaks對象。

本示例更改第一個(gè)垂直分頁(yè)符的位置。

Worksheets(1).VPageBreaks.Item(1).Location = .Range("e5")

應用于 Windows對象。

本示例將活動(dòng)窗口最大化。

Windows.Item(1).WindowState = xlMaximized

應用于 Workbooks對象。

本示例將變量wb 設置為 Myaddin.xla 的工作簿。

Set wb = Workbooks.Item("myaddin.xla")

應用于 Worksheets對象。

Item 是集合的默認成員。例如,下面兩行代碼等價(jià)。

ActiveWorkbook.Worksheets.Item(1)        ActiveWorkbook.Worksheets(1)
本站僅提供存儲服務(wù),所有內容均由用戶(hù)發(fā)布,如發(fā)現有害或侵權內容,請點(diǎn)擊舉報。
打開(kāi)APP,閱讀全文并永久保存 查看更多類(lèi)似文章
猜你喜歡
類(lèi)似文章
Excel應用程序對象(Application對象)及其常用方法基本操作應用示例 - 灰太...
Excel VBA Range對象基本操作應用示例
在Visual Basic中使用Microsoft Excel 工作表函數
Excel VBA編程
VBA幫助
【煙花原創(chuàng )】VBA零基礎之第64篇 單元格對象Range(八)
更多類(lèi)似文章 >>
生活服務(wù)
分享 收藏 導長(cháng)圖 關(guān)注 下載文章
綁定賬號成功
后續可登錄賬號暢享VIP特權!
如果VIP功能使用有故障,
可點(diǎn)擊這里聯(lián)系客服!

聯(lián)系客服

欧美性猛交XXXX免费看蜜桃,成人网18免费韩国,亚洲国产成人精品区综合,欧美日韩一区二区三区高清不卡,亚洲综合一区二区精品久久