Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Propriedades.
AddIndent, Address, AddressLocal, AllowEdit, Application, Areas, Borders, Cells, Characters, Column, ColumnWidth, Columns, Comment, Count, Creator, CurrentArray, CurrentRegion, Dependents, DirectDependents, DirectPrecedents, End, EntireColumn, EntireRow, Errors, Font, FormatConditions, Formula, FormulaArray, FormulaHidden, FormulaLabel, FormulaLocal, FormulaR1C1, FormulaR1C1Local, HasArray,
HasFormula, Height, Hidden, HorizontalAlignment, Hyperlinks, ID, IndentLevel, Interior, Item, Left, ListHeaderRows, LocationInTable, Locked, MergeArea, MergeCells, Name, Next, NumberFormat, NumberFormatLocal, Offset, Orientation, OutlineLevel,
PageBreak, Parent, Phonetic, Phonetics, PivotCell, PivotField, PivotItem, PivotTable, Precedents, PrefixCharacter, Previous, QueryTable, Range, ReadingOrder, Resize, Row, RowHeight, Rows, ShowDetail, ShrinkToFit, SmartTags, SoundNote, Style, Summary, Text, Top, UseStandardHeight, UseStandardWidth, Validation, Value, Value2, VerticalAlignment, Width, Worksheet e WrapText.
Mtodos.
Activate, AddComment, AdvancedFilter, ApplyNames, ApplyOutlineStyles,
AutoComplete, AutoFill, AutoFilter, AutoFit, AutoFormat, AutoOutline, BorderAround, Calculate, CheckSpelling, Clear, ClearComments, ClearContents, ClearFormats,
ClearNotes, ClearOutline, ColumnDifferences, Consolidate, Copy, CopyFromRecordset, CopyPicture, CreateNames, Cut, DataSeries, Delete, DialogBox, Dirty, FillDown, FillLeft, FillRight, FillUp, Find, FindNext, FindPrevious, FunctionWizard, GoalSeek, Group, Insert, InsertIndent, Justify, ListNames, Merge, NavigateArrow, NoteText, Parse, PasteSpecial, PrintOut, PrintPreview, RemoveSubtotal, Replace, RowDifferences, Run, Select, SetPhonetic, Show, ShowDependents, ShowErrors, ShowPrecedents, Sort, SortSpecial, Speak, SpecialCells, Subtotal, Table, TextToColumns, UnMerge e Ungroup.
Acessando clulas.
Voc pode utilizar a coleo Range para acessar uma ou vrias clulas. o 100.
Inseriu um CommandButton para confirmar. Quando o usurio clicar neste boto, os valores digitados nas caixas devero ser atualizados em determinadas clulas.
Simples. No evento Click do CommandButton, associe as caixas de texto a vrios objetos Range.
Esta outra maneira de escrever o cdigo. Ela para os prolixos, aqueles que gostam de escrever muito, repetir e repetir. Tambm no est entre os meus favoritos.
Voc pode utilizar a instruo With... End With. Facilita e torna o cdigo bem legvel.
Voc no se preocupa em saber qual planilha est ativada. Suponha que Plan2 esteja ativada no momento desta atualizao. Tudo bem, no haver problema, porque tudo o que estiver dentro da instruo With... End With corresponder a Plan1.
Outra boa opo ativar a planilha que ser atualizada. A, jovem internauta, depende da sua avaliao. Se voc tem vrias planilhas, ativ-las e desativ-las a todo momento, pode no ser a melhor opo. Porm, se a pasta de trabalho possui poucas planilhas e o ativar/desativar no constante, frentico, ento, vale a pena.
Teste.
isso a, amigos... Jogando conversa fora.
No momento em que esta funo foi executada, Plan2 estava ativada. A ltima linha ( Range("A1").Value = TextBox1.Value ) atualizou qual planilha: Plan1 ou Plan2 ???
exemplo ) precedendo o objeto Range. Quando isso ocorre, o objeto Range se refere planilha ativa. Entenderam, jovens ? J o que est dentro da instruo With...End With foi atualizado em Plan1. OK ?
Para maior segurana e o cdigo ficar legvel, utilize a instruo With...End With ou ative a planilha: Worksheets("Nome_da_Planilha").Activate.