Excel精英培训网

 找回密码
 注册
数据透视表40+个常用小技巧,让你一次学会!
查看: 2773|回复: 2

[已解决]一个窗体求助

[复制链接]
发表于 2015-9-19 15:43 | 显示全部楼层 |阅读模式
本帖最后由 wingotoo 于 2015-9-20 18:43 编辑

我有个需求,当我单击按钮1 时候,
000122221227.png

弹出这样一个窗体(有textbox1和textbox2可供输入,texbox1和2输入时候显示的字体调大点,默认显示太小了)
0001023456.png

输入完 按commonbutton1时将textbox1和textbox2分别输入到图1的内容和备注中,并关闭窗口
            按commonbutton2则退出程序


a.rar (16.8 KB, 下载次数: 2)
excel精英培训的微信平台,每天都会发送excel学习教程和资料。扫一扫明天就可以收到新教程
发表于 2015-9-19 17:23 | 显示全部楼层    本楼为最佳答案   
  1. Private Sub CommandButton1_Click()
  2.   If TextBox1 = "" Or TextBox2 = "" Then
  3.     MsgBox "资料不全": Exit Sub
  4.   End If
  5. Dim i As Integer
  6. With Sheet1
  7.   i = .Range("C65536").End(xlUp).Row + 1
  8.      .Cells(i, 3) = TextBox1.Value
  9.      .Cells(i, 4) = TextBox2.Value
  10. End With
  11. Unload Me
  12. End Sub

  13. Private Sub CommandButton2_Click()
  14. Unload Me
  15. End Sub
复制代码
回复

使用道具 举报

发表于 2015-9-19 17:23 | 显示全部楼层
a0919.rar (16.19 KB, 下载次数: 3)
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|Excel精英培训 ( 豫ICP备11015029号 )

GMT+8, 2024-5-20 04:18 , Processed in 0.107483 second(s), 11 queries , Gzip On, Yac On.

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表