Sub Open_Create_E_Mail()
Dim wbBook As Workbook
Set wbBook = ThisWorkbook
wbBook.FollowHyperlink "mailto:"
End Sub
Welcome to VBA Tips & Tricks. All VBA related information will be posted on this blog. Of late, VBA has been disregarded by many software professionals for .Net, c# and other technologies. This blog will also post articles related to them too Happy reading
Tuesday, March 29, 2011
Activate IE Browser?
Sub Activate_IE()
Dim oIE As Object
Set oIE = CreateObject("InternetExplorer.Application")
With oIE
.Visible = True
.Navigate "http://www.xldennis.com"
End With
Set oIE = Nothing
End Sub
Dim oIE As Object
Set oIE = CreateObject("InternetExplorer.Application")
With oIE
.Visible = True
.Navigate "http://www.xldennis.com"
End With
Set oIE = Nothing
End Sub
Open_Access
Sub Open_Access()
Dim oAccess As Object
Set oAccess = CreateObject("Access.Application")
With oAccess
.Visible = True
.UserControl = True
End With
End Sub
Dim oAccess As Object
Set oAccess = CreateObject("Access.Application")
With oAccess
.Visible = True
.UserControl = True
End With
End Sub
MS Outlook
Sub Open_OutLook()
Dim oOutlook As Object
Dim oNameSpace As Object
Dim oInbox As Object
Set oOutlook = CreateObject("Outlook.Application")
Set oNameSpace = oOutlook.GetNamespace("MAPI")
Set oInbox = oNameSpace.Folders(1)
Set oInbox = oInbox.Folders("Inbox")
oInbox.Display
End Sub
Dim oOutlook As Object
Dim oNameSpace As Object
Dim oInbox As Object
Set oOutlook = CreateObject("Outlook.Application")
Set oNameSpace = oOutlook.GetNamespace("MAPI")
Set oInbox = oNameSpace.Folders(1)
Set oInbox = oInbox.Folders("Inbox")
oInbox.Display
End Sub
How to find the last row or column or cell on a worksheet?
How to find the last row with data on a worksheet:
On Error Resume NextMsgBox ActiveSheet.Cells.Find(What:="*", _ SearchDirection:=xlPrevious, _ SearchOrder:=xlByRows).Row
How to find the last column with data on a worksheet:
On Error Resume NextMsgBox ActiveSheet.Cells.Find(What:="*", _ SearchDirection:=xlPrevious, _ SearchOrder:=xlByColumns).Column
How to find the last cell with data on a worksheet:
On Error Resume NextdxLastCol= ActiveSheet.Cells.Find(What:="*", _ SearchDirection:=xlPrevious, _ SearchOrder:=xlByColumns).Column
dxLastRow= ActiveSheet.Cells.Find(What:="*", _ SearchDirection:=xlPrevious, _ SearchOrder:=xlByRows).Row
dxLastCell=cells(ldxLastRow,dxLastCol).address
', '
On Error Resume NextMsgBox ActiveSheet.Cells.Find(What:="*", _ SearchDirection:=xlPrevious, _ SearchOrder:=xlByRows).Row
How to find the last column with data on a worksheet:
On Error Resume NextMsgBox ActiveSheet.Cells.Find(What:="*", _ SearchDirection:=xlPrevious, _ SearchOrder:=xlByColumns).Column
How to find the last cell with data on a worksheet:
On Error Resume NextdxLastCol= ActiveSheet.Cells.Find(What:="*", _ SearchDirection:=xlPrevious, _ SearchOrder:=xlByColumns).Column
dxLastRow= ActiveSheet.Cells.Find(What:="*", _ SearchDirection:=xlPrevious, _ SearchOrder:=xlByRows).Row
dxLastCell=cells(ldxLastRow,dxLastCol).address
', '
Subscribe to:
Posts (Atom)