Views

...

Important:

Quaisquer soluções e/ou desenvolvimento de aplicações pessoais, ou da empresa, que não constem neste Blog podem ser tratados como consultoria freelance.

E-mails

Deixe seu e-mail para receber atualizações...

eBook Promo

VBA Tips - GetComputerName - API - Obtendo o nome do Computador através de API

Retorne o nome do computador usando uma API.


Private Declare Function GetComputerName Lib "kernel32" Alias _
"GetComputerNameA" (ByVal lpBuffer As String, nSize As Long) As Long






Deixe os seus comentários! Envie este artigo, divulgue este link na sua rede social...


Tags: VBA, Tips, 
API, kernel32.dll, Get, computer, name, 



VBA Tips - GetUserName - API - Obtendo o nome do Usuário com API

Retorne o nome do usuário usando uma API.


Private Declare Function GetUserName Lib "advapi32.dll" Alias _
"GetUserNameA" (ByVal lpBuffer As String, nSize As Long) As Long






Deixe os seus comentários! Envie este artigo, divulgue este link na sua rede social...


Tags: VBA, Tips, 
GetUserName, API, nome, usuário, user, name, username, advapi32.dll, 



VBA Tips - SendLotusEmails - Envie e-mail com o Lotus Notes

Envie e-mails através do Lotus Notes. Requer as Classes de Automação do Lotus (Lotus Automation Classes - notes32.tlb).

   ' Attribute VB_Name = "modLotus"    ' This public sub will send a mail and attachment if neccessary to the recipient including the body text.  ' Requires that notes client is installed on the system.    Public Sub SendLotusEMail(Subject As String, Attachment As String, recipient As String, bodytext As String, saveit As Boolean)        ' Set up the objects required for Automation into lotus notes            Dim MailDB As Object ' The mail database            Dim UserName As String ' The current users notes name            Dim MailDBName As String ' THe current users notes mail database name            Dim MailDoc As Object ' The mail document itself            Dim AttachME As Object ' The attachment richtextfile object            Dim LotusSession As Object ' The notes session            Dim EmbedObj As Object ' The embedded object (Attachment)            ' Start a session to notes            Set LotusSession = CreateObject("Notes.NotesSession")            ' Get the sessions username and then calculate the mail file name            ' You may or may not need this as for MailDBname with some systems you            ' can pass an empty string            UserName = LotusSession.UserName            MailDBName = Left$(UserName, 1) & Right$(UserName, (Len(UserName) - InStr(1, UserName, " "))) & ".nsf"            ' Open the mail database in notes            Set MailDB = LotusSession.GetDatabase("", MailDBName)              If MailDB.isOpen = True Then                        ' Already open for mail              Else                      MailDB.OPENMAIL              End If            ' Set up the new mail document            Set MailDoc = MailDB.CreateDocument            MailDoc.Form = "Memo"            MailDoc.sendto = recipient            MailDoc.Subject = Subject            MailDoc.body = bodytext            MailDoc.SaveMessageOnSend = saveit            ' Set up the embedded object and attachment and attach it            If Attachment <> "" Then                    Set AttachME = MailDoc.CreateRichTextItem("Attachment")                    Set EmbedObj = AttachME.EmbedObject(1454, "", Attachment, "Attachment")                    MailDoc.CreateRichTextItem ("Attachment")            End If            ' Send the document            MailDoc.PostedDate = Now() 'Gets the mail to appear in the sent items folder            MailDoc.Send 0, recipient                  ' Clean Up            Set MailDB = Nothing            Set MailDoc = Nothing            Set AttachME = Nothing            Set LotusSession = Nothing            Set EmbedObj = Nothing    End Sub

Deixe os seus comentários! Envie este artigo, divulgue este link na sua rede social...


Tags: VBA, Lotus, Lotus Notes, e-mails, notes32.tlb, send,



VBA Tips - Launch IE - Carregando o Internet Explorer com uma página




Abra uma nova janela com o Internet Explorer e opcionalmente carregue um endereço.
  Sub LaunchIE()
    Dim objIE As InternetExplorer            Set objIE = New InternetExplorer            objIE.Visible = True            objIE.Navigate "http://inanyplace.blogspot.com"            Do            Loop Until objIE.ReadyState = READYSTATE_COMPLETE            objIE.ExecWB OLECMDID_PRINT, OLECMDEXECOPT_PROMPTUSER    End Sub
Deixe os seus comentários! Envie este artigo, divulgue este link na sua rede social...


Tags: VBA, Tips, Internet, IE Explorer, Microsoft,



VBA Tips - GetComputerName - Sabendo o nome do computador




Tenha acesso ao nome do computador em uso. Essa funcionalidade pode habilitar a sua aplicação para uma conexão automática.
  Private Declare Function GetComputerName Lib "kernel32" Alias _      "GetComputerNameA" (ByVal lpBuffer As String, nSize As Long) As Long
Deixe os seus comentários! Envie este artigo, divulgue este link na sua rede social...


Tags: VBA, Tips, API, DLL, kernel32.dll, GetComputerName, Get, Computer, Name, 



VBA Tips - GetUser - Saiba o nome do usuários do Windows



Saiba o nome do usuário que está usando a sua aplicação.

Podemos usar essa funcionalidade para uma conexão automática, ou solicitação de identificação para acesso. Inclui API.
  Private Declare Function GetUserName Lib "advapi32.dll" Alias _      "GetUserNameA" (ByVal lpBuffer As String, nSize As Long) As Long        Function GetUser() As String              Dim UserName As String ' receives name of the user                Dim slength As Long ' length of the string            Dim RetVal As Long ' return value              UserName = Space(255) ' room for 255 characters              slength = 255 ' initialize the size of the string              RetVal = GetUserName(UserName, slength) ' slength is now the length of the returned string              UserName = Left(UserName, slength - 1) ' extract the returned info from the buffer                User = UserName            End Function

Deixe os seus comentários! Envie este artigo, divulgue este link na sua rede social...


Tags: VBA, API, DLL, api32.dll,



Excel 2013 - Especificações e Limitações - Specifications and Limitations



Não existe nada melhor do que conhecer o ambiente onde trabalhamos ou desenvolvemos. Precisamos compreender as exatas especificações e limitações.

Sim, volto a deixar no original, para que nada possa perder-se por causa da tradução.


Worksheet and workbook specifications and limits MAXIMUM LIMIT
Maximum limits of memory storage and file size for Data Model workbooks Depends on System, please refer MSDN
Open workbooks Limited by available memory and system resources
Sheets in a workbookLimited by available memory
Names in a workbookLimited by available memory
Windows in a workbookLimited by available memory
Linked sheetsLimited by available memory
Scenarios Limited by available memory; a summary report shows only the first 251 scenarios
Custom functions Limited by available memory
ReportsLimited by available memory
Named views in a workbook Limited by available memory
Worksheet size1,048,576 rows by 16,384 columns
Column width255 characters
Row height 409 points
Page breaks1,026 horizontal and vertical
Total number of characters that a cell can contain 32,767 characters
Characters in a header or footer255
Colors in a workbook 16 million colors (32 bit with full access to 24 bit color spectrum)
Unique cell formats/cell styles64,000
Fill styles 256
Line weight and styles256
Unique font types 1,024 global fonts available for use; 512 per workbook
Number formats in a workbookBetween 200 and 250, depending on the language version of Excel that you have installed
Hyperlinks in a worksheet66,530 hyperlinks
Panes in a window 4
Changing cells in a scenario32
Adjustable cells in Solver 200
Zoom range10 percent to 400 percent
Sort references 64 in a single sort; unlimited when using sequential sorts
Undo levels100
Fields in a data form 32
Workbook parameters255 parameters per workbook
Items displayed in filter drop-down lists10,000
Noncontiguous cells that can be selected2,147,483,648 cells
Calculation specifications and limits MAXIMUM LIMIT
Worksheet arrays Limited by available memory
Cross-worksheet array formula dependencyLimited by available memory
Area dependencyLimited by available memory
Area dependency per worksheet Limited by available memory
Number precision15 digits
Smallest allowed negative number -2.23E-308
Smallest allowed positive number2.23E-308
Largest allowed positive number 1.00E+308
Largest allowed negative number-1.00E+308
Largest allowed positive number via formula 1.7976931348623158e+308
Largest allowed negative number via formula-1.7976931348623158e+308
Length of formula contents8,192 characters
Internal length of formula 16,384 bytes
Iterations32,767
Selected ranges 2,048
Arguments in a function255
Nested levels of functions 64
User defined function categories255
Number of available worksheet functions 341
Size of the operand stack1,024
Cross-worksheet dependency 64,000 worksheets that can refer to other sheets
Dependency on a single cell4 billion formulas that can depend on a single cell
Linked cell content length from closed workbooks32,767
Earliest date allowed for calculationJanuary 1, 1900 (January 1, 1904, if 1904 date system is used)
Latest date allowed for calculation31-Dec-99
Largest amount of time that can be entered 9999:59:59
Charting specifications and limits MAXIMUM LIMIT
Charts linked to a worksheet Limited by available memory
Data points in a data series for 2-D chartsLimited by available memory
Data points in a data series for 3-D chartsLimited by available memory
Data points for all data series in one chartLimited by available memory
Worksheets referred to by a chart255
Data series in one chart 255
PivotTable and PivotChart report specifications and limits MAXIMUM LIMIT
PivotTable reports on a sheet Limited by available memory
Row or column fields in a PivotTable reportLimited by available memory
Calculated item formulas in a PivotTable reportLimited by available memory
Calculated item formulas in a PivotChart reportLimited by available memory
Unique items per field1,048,576
Report filters in a PivotTable report 256 (may be limited by available memory)
Value fields in a PivotTable report256
Report filters in a PivotChart report 256 (may be limited by available memory)
Value fields in a PivotChart report256
Length of the MDX name for a PivotTable item 32,767
Length for a relational PivotTable string32,767
Items displayed in filter drop-down lists10,000
Shared workbook specifications and limits MAXIMUM LIMIT
Personal views in a shared workbook Limited by available memory
Workbooks that can be merged at one timeLimited by available memory
Users who can open and share a shared workbook at the same time 256
Days that change history is maintained32,767 (default is 30 days)
Cells that can be highlighted in a shared workbook32,767
Colors used to identify changes made by different users when change highlighting is turned on 32 (each user is identified by a separate color; changes made by the current user are highlighted with navy blue)
Excel tables in a shared workbook 0 (zero)

Deixe os seus comentários! Envie este artigo, divulgue este link na sua rede social...


TagsVBA, Excel, 
Specifications, Limitations, 


Excel Basic - Teclas de Atalho - Shortcut Keys



Sim, combinar teclas pode acelerar muito o nosso trabalho no dia-a-dia, para isso precisamos conhecer algumas combinações. Só terá o trabalho para traduzir. Mas não chore o mais difícil já fiz prá vocês, que foi reuní-las numa lista:


Teclas de CombinaçãoO que fazem
Combinação das Teclas de Atalho do MS Excel para tarefas simples
ALT+TAB Switch to the next window
ALT+SHIFT+TABSwitch to the previous window
ALT+F5Restore the size of the active window after you maximize it
CTRL+W or CTRL+F4 Close the active window
F6Move to a task pane from another pane in the program window (clockwise direction)
SHIFT+F6 Move to a task pane from another pane in the program window  (counterclockwise direction)
Ctrl + F6 Switch between open workbooks or windows
CTRL+SHIFT+F6Switch to the previous window
Ctrl + F9Minimize current window
Ctrl + F10 Maximize currently selected window
PRINT SCREENCopy a picture of the screen to the Clipboard
ALT+PRINT SCREEN Copy a picture of the selected window to the Clipboard
Ctrl + TabMove between Two or more open Excel files
Ctrl+F4 Close the selected workbook window
Ctrl+nCreate a new blank workbook (Excel File)
Ctrl+F7 Move Workbook Windows which are not maximized
Alt+F4Close Excel
Excel Shortcut Keys for Working with Ribbon
Ctrl+F1Minimize or restore the Ribbon
Alt/F10 Select the active tab of the Ribbon and activate the access keys. Press either of these keys again to move back to the document and cancel the access keys. and thenarrow left or arrow right
Shift+F10 Display the shortcut menu for the selected command
Space/EnterActivate the selected command or control in the Ribbon, Open the selected menu or gallery in the Ribbon
EnterFinish modifying a value in a control in the Ribbon, and move focus back to the document
F1Get help on the selected command or control in the Ribbon
Excel Shortcut Keys for Working with Dialogs
Shift + F3Open the Excel formula window
Shift + F5 Bring up search box
CTRL+fDisplay the Find and Replace dialog box (with Find Tab selected)
CTRL+h Display the Find and Replace dialog box (with Replace Tab selected)
CTRL +g (or F5)Display the 'Go To' dialog box
Alt+' Display the Style dialog box
Alt+SpaceDisplay the Control menu for Main Excel window
Ctrl+o Open File
Ctrl+sSave the active file with its current file name, location, and file format
F12 Display the Save As dialog box
f10 (or alt)Turn key tips on or off
Ctrl+p Print File (Opens print menu)
F1Display the Excel Help task pane
F7 Display the Spelling dialog box
Shift+F7Display the Thesaurus dialog box
Alt+F8 Display the Macro dialog box
Alt+F11Open the Visual Basic Editor to create Macros
F11 Create chart
Excel Shortcut Keys for Working with Worksheets
Shift + F11Insert New Worksheet
Ctrl + Page up Move between Excel work sheets in the same Excel document
Ctrl + Page downMove between Excel work sheets in the same Excel document
Page DownMove one screen Down in a worksheet
Page Up Move one screen Up in a worksheet
Alt+Page UpMove one screen to the Left
Alt+Page Down Move one screen to the Right
F7Spell check selected text or document
F11 Create chart
Excel Shortcut Keys for Working with Cells
Combinações Simples
Ctrl + A Select all contents of the worksheet
Ctrl + BBold highlighted selection
Ctrl + I Italic highlighted selection
Ctrl + KInsert link
Ctrl + U Underline highlighted selection
Ctrl + 5Strikethrough highlighted selection
Ctrl + P Bring up the print dialog box to begin printing
Ctrl + ZUndo last action
Ctrl + Y Redo last action
Digitação de Dados
F2Edit the selected cell
Ctrl + Shift + ; Enter the current time
Ctrl + ;Enter the current date
Alt + = Create a formula to sum all of the above cells
Ctrl + 'Insert the value of the above cell into cell currently selected
Select & Move in the sheet
F5Go to a specific cell. For example, C6
Alt+Arrow Down Display the AutoComplete list
Shift + SpaceSelect entire row
Ctrl + Space Select entire column
Ctrl+Shift+oSelect all cells with comments
Shift+Arrow Keys Extend the selection by one cell
Ctrl+Shift+Arrow KeyExtend the selection to the last cell with content in row or column
Shift+Page Down/Shift+Page Up Extend the selection down one screen /up one screen
Shift+HomeExtend the selection to the beginning of the row
Ctrl+Shift+Home Extend the selection to the beginning of the worksheet
Ctrl+Shift+EndExtend the selection to the last used cell on the worksheet (lower-right corner)
Arrow Keys Move one cell up, down, left, or right in a worksheet
HomeMove to the beginning of a row in a worksheet
Ctrl+Home Move to the beginning of a worksheet
Ctrl+EndMove to the last cell with content on a worksheet
Ctrl+ Arrow key Move to next section of text
Ações dentro da célula
Ctrl+Arrow Lef t/ Ctrl+Arrow RightMove one word to the left / to the right
Home / EndMove to the beginning / to the end of a cell entry
Alt+Enter Start a new line in the same cell
EnterComplete a cell entry and move down in the selection
Shift+Enter Complete a cell entry and move up in the selection
EscCancel a cell entry
Backspace Delete the character to the left of the insertion point, or delete the selection
DeleteDelete the character to the right of the insertion point, or delete the selection
Ctrl+DeleteDelete text to the end of the line
Formatando
Ctrl +1Format cells dialog
Ctrl + Shift + ! Format number in comma format
Ctrl + Shift + $Format number in currency format
Ctrl + Shift + # Format number in date format
Ctrl + Shift + %Format number in percentage format
Ctrl + Shift + ^ Format number in scientific format
Ctrl + Shift + @Format number in time format
Ctrl+Shift+~ Apply the General number format
F4Repeat last formatting action/Apply previously applied Cell Formatting to a different Cell
Ativando a edição ou Selecionando as células
Ctrl+d Fill complete cell down (Copy above cell)
Ctrl+rFill complete cell to the right (Copy cell from the left)
Ctrl+" Fill cell values down and edit (Copy above cell values)
Ctrl+' (apostrophe)Fill cell formulas down and edit (Copy above cell formulas)
Ctrl+l Insert a table (display Create Table dialog box)
Ctrl+-Delete Cell/Row/Column Menu
Ctrl+Shift++ Insert Cell/Row/Column Menu
Ctrl+- with row /
column selected
Delete row / delete column
Ctrl+Shift++ with row /
column selected
Insert row/ insert column.
Shift+F2Insert / Edit a cell comment
Shift+f10, then m Delete comment.
Alt+F1Create and insert chart with data in current range as embedded Chart Object
F11 Create and insert chart with data in current range in a separate Chart sheet
Ctrl+kInsert a hyperlink
Enter (in a cell with a hyperlink)Activate a hyperlink
Mostrando e escondendo elementos
Ctrl+9 Hide the selected rows
Ctrl+Shift+9Unhide any hidden rows within the selection
Ctrl+0 (zero) Hide the selected columns
Ctrl+Shift+0 (zero)Unhide any hidden columns within the selection
Ctrl+ ~ Alternate between displaying cell values and displaying cell formulas
Alt+Shift+Arrow RightGroup rows or columns
Alt+Shift+Arrow Left Ungroup rows or columns
Ctrl+6Alternate between hiding and displaying objects
Ctrl+8 Display or hides the outline symbols
Ctrl+6Alternate between hiding objects, displaying objects, and displaying placeholders for objects
Fórmulas e Nomes
=Start a formula
Alt+= Insert the AutoSum formula
Shift+F3Display the Insert Function dialog box
Ctrl+a Display Formula Window after typing formula name
Ctrl+Shift+aInsert Arguments in formula after typing formula name
Shift+F3 Insert a function into a formula
Ctrl+Shift+EnterEnter a formula as an array formula
F4 After typing cell reference (e.g. =A5) makes reference absolute (=$A$5)
F9Calculate all worksheets in all open workbooks
Shift+F9 Calculate the active worksheet
Ctrl+Alt+F9Calculate all worksheets in all open workbooks, regardless of whether they have changed since the last calculation
Ctrl+Alt+Shift+F9Recheck dependent formulas, and then calculates all cells in all open workbooks, including cells not marked as needing to be calculated
Ctrl+Shift+uToggle expand or collapse formula bar

Deixe os seus comentários! Envie este artigo, divulgue este link na sua rede social...


TagsVBA, Excel, 
Merge, UnMerge, Cells, células, mesclar, 


eBooks VBA na AMAZOM.com.br

LinkWithinBrazilVBAExcelSpecialist

Related Posts Plugin for WordPress, Blogger...

Vitrine