Showing posts with label VBA Access. Show all posts
Showing posts with label VBA Access. Show all posts

Jan 15, 2014

MS Access - open form in another database

If you want to open a new form from another Access file you can use following code:

Public Sub OpenForeignForm()  
 Dim appAccess As Access.Application  
 Set appAccess = CreateObject("Access.Application")  
 appAccess.OpenCurrentDatabase "C:\MyPath\DataBaseName2.mdb"  
 appAccess.DoCmd.OpenForm "FormName"  
 Set appAccess = Nothing 
End Sub 

Dec 11, 2013

Excel VBA: Clipboard clear

This year I started to work into a big company. Here I need to code in MS EXcel VBA. Or VBA Access.

Trying to copy the data from a Excel Sheet to another Sheet, I started to use VBA Clipboard. But, at the end, the clipboard has remained full. The solution  was following:

Clipboard clear 

If you want to cleanup the clipboard of an Excel using VBA, this is the way:
Application.CutCopyMode = False