Combobox在自定义菜单栏上 [英] Combobox On A Custom Menubar

查看:98
本文介绍了Combobox在自定义菜单栏上的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在自定义菜单栏中创建一个组合框来显示以下几个月:

1月1月

2月2月

3月3日




然后将所选月份的月份编号(1,2,3等)分配给

文本框表格?


感谢您的帮助!


Judy

How do I create a combobox in a custom menubar to display months like:
1 January
2 February
3 March
etc

and then assign the month number (1, 2, 3, etc) of the selected month to a
textbox on a form?

Thanks for all help!

Judy

推荐答案

Judy写道:
如何在自定义菜单栏中创建一个组合框来显示月份:
1月1日
2月2日
3月3日

然后将所选月份的月份编号(1,2,3等)分配给表单上的
文本框?
How do I create a combobox in a custom menubar to display months like:
1 January
2 February
3 March
etc

and then assign the month number (1, 2, 3, etc) of the selected month to a
textbox on a form?




创建一个包含这些值的表,并将组合框放在该表上


-

Bas Cost Budde,荷兰
http://www.heuveltop.nl/BasCB/msac_index html的

我更喜欢自动上面的人工邮件,所以在我的地址中

用茶替换队列



Create a table with those values and base the combobox on that table

--
Bas Cost Budde, Holland
http://www.heuveltop.nl/BasCB/msac_index.html
I prefer human mail above automated so in my address
replace the queue with a tea


但是怎么做我在自定义菜单栏上创建了一个组合框?那么如何将表格中的

值输入组合框并显示月份名称?最后,

如何在

表格中将所选月份的月份编号分配给文本框?


Judy < br $> b $ b" Bas Cost Budde" < B ********* @ heuvelqop.nl>在消息中写道

news:co ********** @ news2.solcon.nl ...
But how do I create a combobox on a custom menubar? Then how do I get the
values in the table into the combobox and display the month name? Finally,
how do I assign the month number of the month selected to the textbox on a
form?

Judy
"Bas Cost Budde" <b.*********@heuvelqop.nl> wrote in message
news:co**********@news2.solcon.nl...
Judy写道:
如何在自定义菜单栏中创建一个组合框来显示以下几个月:
1月1日
2月2日
3月3日

然后将所选月份的月份编号(1,2,3等)分配给表单上的
a文本框?
How do I create a combobox in a custom menubar to display months like:
1 January
2 February
3 March
etc

and then assign the month number (1, 2, 3, etc) of the selected month to a textbox on a form?



创建一个包含这些值的表格并将组合框置于其上那张桌子

-
Bas Cost Budde,荷兰
http://www.heuveltop.nl/BasCB/msac_index.html
我更喜欢人工邮件以上自动化,所以在我的地址中用茶替换队列



Create a table with those values and base the combobox on that table

--
Bas Cost Budde, Holland
http://www.heuveltop.nl/BasCB/msac_index.html
I prefer human mail above automated so in my address
replace the queue with a tea



" Judy" < JR ******* @ notmyemail.com>在消息中写道

新闻:M%***************** @ newsread2.news.atl.earthl ink.net ...
"Judy" <jr*******@notmyemail.com> wrote in message
news:M%*****************@newsread2.news.atl.earthl ink.net...
但是如何在自定义菜单栏上创建组合框呢?那么如何将表格中的
值放入组合框并显示月份名称?最后,
如何在
表单上将所选月份的月份编号分配到文本框?
But how do I create a combobox on a custom menubar? Then how do I get the
values in the table into the combobox and display the month name? Finally,
how do I assign the month number of the month selected to the textbox on a
form?




Sub AddComboToMenu()


Dim Mnu作为对象

Dim Cbo As Object


设置Mnu = CommandBars(MyMenuBar)

设置Cbo = Mnu.Controls.Add(4,1)


使用Cbo

.AddItem" January",1

.AddItem" February",2

.AddItem" March",3

.AddItem" April",4&br / >
.AddItem" May",5

.AddItem" June",6

.AddItem" July",7

.AddItem" August",8

.AddItem" September",9

.AddItem" October",10

.AddItemNovember,11

.AddItem" December" 12

结束


设置Cbo =什么都没有

设置Mnu =没什么


结束子


-

我没有查看此邮件附带的电子邮件帐户

。发送给...

在Hunter dot com的RBrandt



Sub AddComboToMenu()

Dim Mnu As Object
Dim Cbo As Object

Set Mnu = CommandBars("MyMenuBar")
Set Cbo = Mnu.Controls.Add(4, 1)

With Cbo
.AddItem "January", 1
.AddItem "February", 2
.AddItem "March", 3
.AddItem "April", 4
.AddItem "May", 5
.AddItem "June", 6
.AddItem "July", 7
.AddItem "August", 8
.AddItem "September", 9
.AddItem "October", 10
.AddItem "November", 11
.AddItem "December", 12
End With

Set Cbo = Nothing
Set Mnu = Nothing

End Sub

--
I don''t check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com


这篇关于Combobox在自定义菜单栏上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆