I was wondering if the CommandBarButto n OnAction property would allow
you to specify a function from a module to be called. According to the
post made by Turtle in 1998, the OnAction property can only specify a
macro name. Is this still the case? I agree with Turtle that "this is
pretty funky."
-Vincent
From: Turtle - view profile
Date: Sat, Nov 21 1998 4:00 am
Email: "Turtle" <macderm...@min dspring.com>
Groups: comp.databases. ms-access,
microsoft.publi c.access.module sdaovba
OnAction has to be a macro name. However, this macro can contain only
the
one command RunCode and refer to a function (not a sub, but it ignores
any
value the function returns.)
Personally, I think this is pretty funky. It's one of the few places I
know of where professional programmers use macros.
- Turtle 4 8300
Also, are there any alternatives to the CommandBars for easily creating
popup menus in VBA? Thanks.
-Vincent
Vincent wrote: I was wondering if the CommandBarButto n OnAction property would allow you to specify a function from a module to be called. According to the post made by Turtle in 1998, the OnAction property can only specify a macro name. Is this still the case? I agree with Turtle that "this is pretty funky."
No it can be the name of a public function. It just can't be a sub-routine.
--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com
Vincent wrote: Also, are there any alternatives to the CommandBars for easily creating popup menus in VBA? Thanks.
-Vincent
In the Customize dialog for command bars you can change any of them that you
have created to type Popup.
--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com
"Vincent" <an**********@v erizon.net> wrote in news:1144877963 .868769.220530
@z34g2000cwc.go oglegroups.com: I was wondering if the CommandBarButto n OnAction property would allow you to specify a function from a module to be called. According to the post made by Turtle in 1998, the OnAction property can only specify a macro name. Is this still the case? I agree with Turtle that "this is pretty funky."
-Vincent
From: Turtle - view profile Date: Sat, Nov 21 1998 4:00 am Email: "Turtle" <macderm...@min dspring.com> Groups: comp.databases. ms-access, microsoft.publi c.access.module sdaovba
OnAction has to be a macro name. However, this macro can contain only the one command RunCode and refer to a function (not a sub, but it ignores any value the function returns.)
Personally, I think this is pretty funky. It's one of the few places I know of where professional programmers use macros.
- Turtle
One can specify the name of a public function and one can specify
parameters for the function as literals as
cbc.OnAction = "=GetComments(1 )"
(as per Terry Kreft 2006-01-24)
--
Lyle Fairfield This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Johan Christensson |
last post by:
Hi.
I'm woundering if it's possibel to transfer a OnAction value from a
drop-down box in an ASP page without having to use Java code?
I mean something like this:
<%
Sub resposeprocess
|
by: G.Gerard |
last post by:
Hello
Does anyone know how to write a function name with arguments in the OnAction
of a command
bar button:
Example: Public Sub MyFunction(strMsg as String)
Msgbox strMsg
|
by: Paul |
last post by:
This is MS Access 2002. I am creating some custom buttons on a
CommandBar for a form. Below is the code. It works fine except that
the OnAction procedure is executed twice. Why? How can I fix this?
Private Sub cmdCreateTestToolBar_Click()
On Error Resume Next
CommandBars("Test Toolbar").Delete
On Error GoTo ErrorFound
|
by: maitrepoy |
last post by:
I have to create a small addin which works on Powerpoint, Word, Outlook, and Excel on Office 2000, XP, and 2003.
This addin consists in adding 2 new Buttons in the "File" Menu of office. This is properly done, but the events which should be triggered with the button.click method are not triggered in Word.
I don't understand because it properly works in the 3 others host applications.
If someone has an issue, I would be most grateful.
Thanks...
|
by: Galin iliev |
last post by:
Hello guys
I 've been digging for a while trying to add nice image to CommandBarButton
in MS Word using VS 2005 without aby luck.
I found http://blogs.msdn.com/vsto/archive/2003/12/18/44404.aspx and
http://support.microsoft.com/default.aspx?scid=kb;en;288771
second one gives very good exmaple for merging image and mask in Clipboard
and paste face on button at once. there is some code for creating mask image
from source but it is on VB6...
| |
by: Ken |
last post by:
Please help I've been working on this for over a day.
The following code will run the GetComments function from a shortcut
menu.
.MoveFirst
Set cmb = Application.CommandBars.Add("Comments",
msoBarPopup, , True)
Do While Not .EOF
Set cbc = cmb.Controls.Add(msoControlButton)
|
by: ApexData |
last post by:
I have a ShortCutMenu that is made available on the RightClick of the
mouse. The OnAction property has my custom function:
=ComboBoxEditor()
I believe that, in the ONAction property, I could do something like
this to allow or prohib the use of the function???
=iif(blnUseThis,ComboBoxEditor(),Msgbox "NotAvailable")
Is there a way to enable or disable the actual menu option from even
showing on the rightclick of the mouse. For example
|
by: arnott |
last post by:
hi all,
I am writing a add-in for Outlook 2007 using C# and VSTO ( Visual Studio 2008). When the user clicks on each mailitem in the inbox (or any folder) in the active explorer window, the add-in needs to parse the mail and look for "pdf2:xxxx" and create and add as many commandbarbuttons to a CommandBar.
The problem is when the I click on the same mail again the eventhandler for the CommandBarButton gets added again. As a result when...
|
by: grusso |
last post by:
well, i need a table with all functions for onaction sentence. where i can obtain? thank yourssss
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |