UtterAccess HomeUtterAccess Wiki

Welcome Guest ( Log In | Register )

Custom Search
Edit Discussion
> Menu Bar VBE    
Menu Bar VBE

Image:NotifCleanup.gif This page requires general cleanup in formatting or text to better fit the UA Wiki Guidelines

First open Ac_Menu,Visual Basic Editor, (Toolbars)

  • Find on this WIKI-Page.. in Internet Explorer, Press CTRL+F

Contents

Menu Bar VBE

File

Wiki-link: [[Menu Bar VBE#Menu Bar VBE|VBE_Menu,Menu Bar VBE]]

Wiki-link: [[Menu Bar VBE#File|VBE_Menu,File]]

File,Save Your_Database_Name

Wiki-link: [[Menu Bar VBE#File,Save Your_Database_Name|VBE_Menu,Save Your_Database_Name]]

File,Import File...

Wiki-link: [[Menu Bar VBE#File,Import File...|VBE_Menu,Import File...]]

File,Export File...

Wiki-link: [[Menu Bar VBE#File,Export File...|VBE_Menu,Export File...]]

File,Remove basEnumerate...

Wiki-link: [[Menu Bar VBE#File,Remove basEnumerate...|VBE_Menu,Remove basEnumerate...]]

File,Print...

Wiki-link: [[Menu Bar VBE#File,Print...|VBE_Menu,Print...]]

File,Close and Return to Microsoft Access

Wiki-link: [[Menu Bar VBE#File,Close and Return to Microsoft Access|VBE_Menu,Close and Return to Microsoft Access]] Menu Bar

Edit

Wiki-link: [[Menu Bar VBE#Edit|VBE_Menu,Edit]]

Image:NotifWarningStrong.gif Before Code Edit switch to VBE_Menu,Design Mode

Edit,Can`t Undo

Wiki-link: [[Menu Bar VBE#Edit,Can`t Undo|VBE_Menu,Can`t Undo]]

Edit,Can`t Redo

Wiki-link: [[Menu Bar VBE#Edit,Can`t Redo|VBE_Menu,Can`t Redo]]

Edit,Cut

Wiki-link: [[Menu Bar VBE#Edit,Cut|VBE_Menu,Cut]]

Edit,Copy

Wiki-link: [[Menu Bar VBE#Edit,Copy|VBE_Menu,Copy]]

Edit,Paste

Wiki-link: [[Menu Bar VBE#Edit,Paste|VBE_Menu,Paste]]

Edit,Clear

Wiki-link: [[Menu Bar VBE#Edit,Clear|VBE_Menu,Clear]]

Edit,Select All

Wiki-link: [[Menu Bar VBE#Edit,Select All|VBE_Menu,Select All]]

Edit,Find...

Wiki-link: [[Menu Bar VBE#Edit,Find...|VBE_Menu,Find...]]

Edit,Find Next

Wiki-link: [[Menu Bar VBE#Edit,Find Next|VBE_Menu,Find Next]]

Edit,Replace...

Wiki-link: [[Menu Bar VBE#Edit,Replace...|VBE_Menu,Replace...]]

Edit,Indent

Wiki-link: [[Menu Bar VBE#Edit,Indent|VBE_Menu,Indent]]

Edit,Outdent

Wiki-link: [[Menu Bar VBE#Edit,Outdent|VBE_Menu,Outdent]]

Edit,List Properties/Methods

Wiki-link: [[Menu Bar VBE#Edit,List Properties/Methods|VBE_Menu,List Properties/Methods]]

Edit,List Constants

Wiki-link: [[Menu Bar VBE#Edit,List Constants|VBE_Menu,List Constants]]

Edit,Quick Info

Wiki-link: [[Menu Bar VBE#Edit,Quick Info|VBE_Menu,Quick Info]]

You can click on Quick Info or you can use this Prefixes .., or other in Naming Conventions.

Prefix-Full Prefix-Region Prefix-Constant Prefix-Type Prefix-Example, Variable declaration Variable Visibility
gkc_ g
(global)
k
(Constant)
c
(String/Character)
(Module Declaration Section)
Public Const gkc_DriveFrontEnd = "C"
Everywhere in PROJECT
(ALL Modules/Procedures)
mkc_ m
(module)
k
(Constant)
c
(String/Character)
(Module Declaration Section)
Private Const mkc_ModuleName = "MOD_Constants"
Only in THIS MODULE
lkc_ l
(local)
k
(Constant)
c
(String/Character)
(Procedure Declaration Section)
Const lkc_ProcedureName = "Test"
Only in THIS PROCEDURE
(Sub/Function)
lc_ l
(local)
NONE
(Not Constant)
c
(String/Character)
(Procedure Declaration Section)
Dim lc_MyVariable As String
Only in THIS PROCEDURE
(Sub/Function)
c NONE
(local, function parameter)
NONE
(Not Constant)
c
(String/Character)
(Procedure Definition Section)
Optional cDatabaseFullName As String
Only in THIS PROCEDURE
(Function)

Edit,Parameter Info

Wiki-link: [[Menu Bar VBE#Edit,Parameter Info|VBE_Menu,Parameter Info]]

Edit,Complete Word

Wiki-link: [[Menu Bar VBE#Edit,Complete Word|VBE_Menu,Complete Word]]

Edit,Bookmarks

Wiki-link: [[Menu Bar VBE#Edit,Bookmarks|VBE_Menu,Bookmarks]]

Edit,Bookmarks,Toggle Bookmark

Wiki-link: [[Menu Bar VBE#Edit,Bookmarks,Toggle Bookmark|VBE_Menu,Toggle Bookmark]]

Edit,Bookmarks,Next Bookmark

Wiki-link: [[Menu Bar VBE#Edit,Bookmarks,Next Bookmark|VBE_Menu,Next Bookmark]]

Edit,Bookmarks,Previous Bookmark

Wiki-link: [[Menu Bar VBE#Edit,Bookmarks,Previous Bookmark|VBE_Menu,Previous Bookmark]]

Edit,Bookmarks,Clear All Bookmarks

Wiki-link: [[Menu Bar VBE#Edit,Bookmarks,Clear All Bookmarks|VBE_Menu,Clear All Bookmarks]]

View

Wiki-link: [[Menu Bar VBE#View|VBE_Menu,View]]

View,Code

Wiki-link: [[Menu Bar VBE#View,Code|VBE_Menu,Code]]

View,Object

Wiki-link: [[Menu Bar VBE#View,Object|VBE_Menu,Object]]

View,Definition

Wiki-link: [[Menu Bar VBE#View,Definition|VBE_Menu,Definition]]

View,Last Position

Wiki-link: [[Menu Bar VBE#View,Last Position|VBE_Menu,Last Position]]

View,Object Browser

Wiki-link: [[Menu Bar VBE#View,Object Browser|VBE_Menu,Object Browser]]

  • KeyBoard-ShortCut: PRESS F2
  • For HELP Select Unknown-Item/Keyword and PRESS F1
  • To Add NEW Project/Library VBE_Menu,References...

Image:ACC_VBE_OBJECT_BROWSER.JPG

View,Immediate Window

Wiki-link: [[Menu Bar VBE#View,Immediate Window|VBE_Menu,Immediate Window]]

Examples:

CODE

? (5*20)/3
33.3333333333333
? msgbox("Continue ?",vbYesNo+vbDefaultButton1+vbQuestion,"Ask the User..")
6
? inputbox("Your Age ?","Ask the User..",50)
10
msgbox "Switch me OFF and go out !",vbInformation,"Say to User.."
? Now,Date, WeekdayName( Weekday ( Date ))
24/04/2010 02:27:07 PM      24/04/2010    Saturday

View,Locals Window

Wiki-link: [[Menu Bar VBE#View,Locals Window|VBE_Menu,Locals Window]]

Image:ACC_VBE_LOCALS_WINDOW.JPG

View,Watch Window

Wiki-link: [[Menu Bar VBE#View,Watch Window|VBE_Menu,Watch Window]]

View,Call Stack...

Wiki-link: [[Menu Bar VBE#View,Call Stack...|VBE_Menu,Call Stack...]]

View,Project Explorer

Wiki-link: [[Menu Bar VBE#View,Project Explorer|VBE_Menu,Project Explorer]]

View,Properties Window

Wiki-link: [[Menu Bar VBE#View,Properties Window|VBE_Menu,Properties Window]]

View,Toolbox

Wiki-link: [[Menu Bar VBE#View,Toolbox|VBE_Menu,Toolbox]]

View,Toolbars

Wiki-link: [[Menu Bar VBE#View,Toolbars|VBE_Menu,Toolbars]]

View,Toolbars,Debug

Wiki-link: [[Menu Bar VBE#View,Toolbars,Debug|VBE_Menu,Debug]]

View,Toolbars,Edit

Wiki-link: [[Menu Bar VBE#View,Toolbars,Edit|VBE_Menu,Edit]]

View,Toolbars,Standard

Wiki-link: [[Menu Bar VBE#View,Toolbars,Standard|VBE_Menu,Standard]]

View,Toolbars,UserForm

Wiki-link: [[Menu Bar VBE#View,Toolbars,UserForm|VBE_Menu,UserForm]]

View,Toolbars,MZ-Tools 3.0

Wiki-link: [[Menu Bar VBE#View,Toolbars,MZ-Tools 3.0|VBE_Menu,MZ-Tools 3.0]]

View,Toolbars,Customize...

Wiki-link: [[Menu Bar VBE#View,Toolbars,Customize...|VBE_Menu,Customize...]]

CODE

for i = 1 to application.CommandBars.Count: debug.Print application.CommandBars(i).Name: NEXT i
If gkl_AC2010 Then
   For I2 = 1 To Application.CommandBars.Count
       Set MyBar00 = Application.CommandBars(I2)
       If Len(Trim(MyBar00.Name)) = 0 And MyBar00.Id = 186 Then
           Set MyBar = Application.CommandBars(I2)
           Exit For
       End If
   Next I2
Else
   Set MyBar = Application.CommandBars("Table Design Datasheet")' HEADER
End If
Application.CommandBars("Table Design Datasheet Row")
Application.CommandBars("Table Design Datasheet Column")

View,Microsoft Access

Wiki-link: [[Menu Bar VBE#View,Microsoft Access|VBE_Menu,Microsoft Access]]

Insert

Wiki-link: [[Menu Bar VBE#Insert|VBE_Menu,Insert]]

Insert,Procedure...

Wiki-link: [[Menu Bar VBE#Insert,Procedure...|VBE_Menu,Procedure...]]

Insert,Module

Wiki-link: [[Menu Bar VBE#Insert,Module|VBE_Menu,Module]]

CODE

Option Compare Database
Option Explicit

'GLOBAL Constant, Visible everywhere in Project
Public Const gkc_DriveFrontEnd = "C"    

'LOCAL Constant, Visible only in THIS MODULE
Private Const mkc_ModuleName = "MOD_Constants"
'-------------------------------------
Public Sub Test()
On Error GoTo LBL_xPAC_ERR

'LOCAL Constant, Visible only in THIS PROCEDURE/SUB
Const lkc_ProcedureName = "Test"        

LBL_xPAC_END:
   Exit Sub
LBL_xPAC_ERR:
MsgBox "Err: " & Err & "," & Err.Description, vbCritical, lkc_ProcedureName
   Resume LBL_xPAC_END
   Resume Next
   Resume
End Sub
CODE

Option Compare Database
Option Explicit
#Const mflg_UseADO = True    ' conditional compiler constant for THIS MODULE
#Const mflg_DebugMode = True ' conditional compiler constant for THIS MODULE
Public Sub Test_ADO_DAO()
#If mflg_UseADO Then
'ADO code here.....If mflg_UseADO = True
#Else
'DAO code here.....If mflg_UseADO = False
#End If
#If mflg_DebugMode Then
' DEBUG-code here.....If mflg_DebugMode = True
#End If
End Sub

Insert,Class Module

Wiki-link: [[Menu Bar VBE#Insert,Class Module|VBE_Menu,Class Module]]

Insert,File...

Wiki-link: [[Menu Bar VBE#Insert,File...|VBE_Menu,File...]]

Debug

Wiki-link: [[Menu Bar VBE#Debug|VBE_Menu,Debug]]

Debug,Compile Your_Database_Name

Wiki-link: [[Menu Bar VBE#Debug,Compile Your_Database_Name|VBE_Menu,Compile Your_Database_Name]]

Debug,Step Into

Wiki-link: [[Menu Bar VBE#Debug,Step Into|VBE_Menu,Step Into]]

Debug,Step Over

Wiki-link: [[Menu Bar VBE#Debug,Step Over|VBE_Menu,Step Over]]

Debug,Step Out

Wiki-link: [[Menu Bar VBE#Debug,Step Out|VBE_Menu,Step Out]]

Debug,Run To Cursor

Wiki-link: [[Menu Bar VBE#Debug,Run To Cursor|VBE_Menu,Run To Cursor]]

Debug,Add Watch...

Wiki-link: [[Menu Bar VBE#Debug,Add Watch...|VBE_Menu,Add Watch...]] Image:ACC_VBE_ADD_WATCH.JPG

Debug,Edit Watch...

Wiki-link: [[Menu Bar VBE#Debug,Edit Watch...|VBE_Menu,Edit Watch...]]

Debug,Quick Watch...

Wiki-link: [[Menu Bar VBE#Debug,Quick Watch...|VBE_Menu,Quick Watch...]]

Debug,Toggle Breakpoint

Wiki-link: [[Menu Bar VBE#Debug,Toggle Breakpoint|VBE_Menu,Toggle Breakpoint]]

Debug,Clear All Breakpoints

Wiki-link: [[Menu Bar VBE#Debug,Clear All Breakpoints|VBE_Menu,Clear All Breakpoints]]

Debug,Set Next Statement

Wiki-link: [[Menu Bar VBE#Debug,Set Next Statement|VBE_Menu,Set Next Statement]]

Debug,Show Next Statement

Wiki-link: [[Menu Bar VBE#Debug,Show Next Statement|VBE_Menu,Show Next Statement]]

Run

Wiki-link: [[Menu Bar VBE#Run|VBE_Menu,Run]]

  • For Macro-Code STOP (For-Ever-Loop), press CTRL+BREAK to pause execution of Visual Basic code ( Microsoft Access Help (F1), Answer wizard=AllowBreakIntoCode ), DO NOT KILL your Application with Task Manager !
  • If something goes Wrong Error Codes

Run,Macro/Continue

Wiki-link: [[Menu Bar VBE#Run,Continue|VBE_Menu,Macro/Continue]]

Run,Break

Wiki-link: [[Menu Bar VBE#Run,Break|VBE_Menu,Break]]

Run,Reset

Wiki-link: [[Menu Bar VBE#Run,Reset|VBE_Menu,Reset]]

Run,Design Mode

Wiki-link: [[Menu Bar VBE#Run,Design Mode|VBE_Menu,Design Mode]]

Tools

Wiki-link: [[Menu Bar VBE#Tools|VBE_Menu,Tools]]

Tools,References...

Wiki-link: [[Menu Bar VBE#Tools,References...|VBE_Menu,References...]]

Use CODE-LIBRARY from external / internal (Your Databases) resources, Click on Browse.. Image:ACC_VBE_REFERENCES.JPG

CODE

for i=1 to references.Count: Debug.print i & "," & references(i).FullPath: next i
CODE

Dim rs1 As ADODB.Recordset ' Library ADODB...........OK
Dim rs2 As DAO.Recordset     ' Library DAO................OK
'rs3 Type=(ADODB/DAO)?, It depends on Library Higher Priority in References
Dim rs3 As Recordset ' Library (ADODB/DAO) ? ............NOT OK
  • Call/Run External Procedure (Your_DatabaseFunctionName) in Your_Project_Name in Your_Database_Path\Your_DatabaseName
CODE

' Example Call
? Run("Your_Project_Name.Your_DatabaseFunctionName","Optional, Your Argument-1,..")
Run "Your_Project_Name.Your_DatabaseFunctionName","Optional, Your Argument-1,.."
Run "db2.MyFunc" ' call from db1.MDB
Libraries
Library VBA
Library Access
Library DAO

Wiki-link: [[Menu Bar VBE#Library DAO|VBE_Menu,References...Library DAO]]

Library ADODB

Wiki-link: [[Menu Bar VBE#Library ADODB|VBE_Menu,References...Library ADODB]]

Library ADOX
Library Scripting

Wiki-link: [[Menu Bar VBE#Library Scripting|VBE_Menu,References...Library Scripting]]

Library Office
Library Excel
Library JRO
Library VBIDE
  • Library VBIDE, VBProject (Visual Basic Editor), Microsoft Visual Basic for Applications Extensibility, VBE6EXT.OLB
Library MSForms
  • Library MSForms,Microsoft Forms 2.0 Object Library (Excel.UserForms), C:\WINDOWS\system32\FM20.DLL
Library MSComctlLib
Library MSHTML
Library Shell32
Library IWshRuntimeLibrary
Library OLXLib
CODE

Private Sub Form_Load()
Me![ViewCtl0].Folder = "Calendar"
Me![ViewCtl0].View = "Day/Week/Month"
End Sub
Library API
Library Your_Project_Name

Wiki-link: [[Menu Bar VBE#Library Your_Project_Name|VBE_Menu,References...Library Your_Project_Name]]

Tools,Macros...

Wiki-link: [[Menu Bar VBE#Tools,Macros...|VBE_Menu,Macros...]]

Tools,Options...

Wiki-link: [[Menu Bar VBE#Tools,Options...|VBE_Menu,Options...]]

Image:ACC_VBE_OPTIONS_01.JPG

Tools,Your_Database_Name Properties...

Wiki-link: [[Menu Bar VBE#Tools,Your_Database_Name Properties...|VBE_Menu,Your_Database_Name Properties...]]

Add-Ins

Wiki-link: [[Menu Bar VBE#Add-Ins|VBE_Menu,Add-Ins]]

Add-Ins,Add-In Manager...

Wiki-link: [[Menu Bar VBE#Add-Ins,Add-In Manager...|VBE_Menu,Add-In Manager...]]

Window

Wiki-link: [[Menu Bar VBE#Window|VBE_Menu,Window]]

CODE

DoCmd.Echo True  ' (Default) Screen/Window is repainted
DoCmd.Echo False ' **Frozen** Screen/Window, Screen is **NOT** repainted
DoCmd.Hourglass True  ' Screen/Window mouse pointer: hourglass icon
Screen.MousePointer = 11 ' Screen/Window mouse pointer: hourglass icon
DoCmd.Hourglass False ' Screen/Window mouse pointer: normal

Window,Split

Wiki-link: [[Menu Bar VBE#Window,Split|VBE_Menu,Split]]

Window,Tile Horizontally

Wiki-link: [[Menu Bar VBE#Window,Tile Horizontally|VBE_Menu,Tile Horizontally]]

Window,Tile Vertically

Wiki-link: [[Menu Bar VBE#Window,Tile Vertically|VBE_Menu,Tile Vertically]]

Window,Cascade

Wiki-link: [[Menu Bar VBE#Window,Cascade|VBE_Menu,Cascade]]

Window,Arrange Icons

Wiki-link: [[Menu Bar VBE#Window,Arrange Icons|VBE_Menu,Arrange Icons]]

Help

Wiki-link: [[Menu Bar VBE#Help|VBE_Menu,Help]]

Help,Microsoft Visual Basic Help

Wiki-link: [[Menu Bar VBE#Help,Microsoft Visual Basic Help|VBE_Menu,Microsoft Visual Basic Help]] Image:ACC_VBE_HELP_01.JPG

Help,MSDN on the Web

Wiki-link: [[Menu Bar VBE#Help,MSDN on the Web|VBE_Menu,MSDN on the Web]]

Help,About Microsoft Visual Basic...

Wiki-link: [[Menu Bar VBE#Help,About Microsoft Visual Basic...|VBE_Menu,About Microsoft Visual Basic...]]

  • Check Current File Version of VBE6.DLL (Visual Basic Design Time Environment), 6.05.1053, VBE_Menu,References...

Bottom of Menu Bar VBE

Edit Discussion
Custom Search
Thank you for your support!
This page has been accessed 96,768 times.  This page was last modified 09:25, 9 April 2015 by pacala_ba. Contributions by Jack Leach  Disclaimers