在vba中怎么将做好的窗体放到excel表格中的某个单元格里?谢谢了
\u6c42\u505a\u4e00excel\u8868\u683c\uff0c\u4f1a\u4f7f\u7528\u5230\u7a97\u4f53\u53cavbaRMB\u5c31\u5148\u4e0d\u8bf4\u4e86\u5427,\u7b49\u5230\u505a\u5b8c\u4e86\u518d\u8bf4,\u6211\u5f88\u671f\u8fd9\u4e00\u5957\u7cfb\u7edf\u7684\u5b8c\u5de5,\u563f\u563f!\u4ece\u81ea\u5b66VB\u4e0eVBA\u5f00\u59cb,\u7b2c\u4e00\u6b21\u5c1d\u8bd5\u5f00\u53d1\u6570\u636e\u5e93\u5e94\u7528\u65b9\u9762\u7684\u7a0b\u5e8f,\u540e\u671f\u5236\u4f5c\u8fd8\u4f1a\u6709\u5f88\u591a\u96be\u9898,\u671f\u671b\u90fd\u80fd\u591f\u987a\u5f97\u7684\u5b8c\u6210.
USERFORM1.SHOW 0
0\u662f\u7a97\u4f53\u663e\u793a\u6a21\u5f0f\u4e3a\u65e0\u6a21\u5f0f\u7a97\u4f53\uff0c\uff0c\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0c\u7a97\u4f53\u663e\u793a\u662f\u6a21\u6001\u7684\uff08\u5728\u505a\u522b\u7684\u4e8b\u60c5\u4e4b\u524d\uff0c\u5fc5\u987b\u4f7f\u7528\u6237\u7a97\u4f53\u6d88\u5931\uff09
绛旓細鎶婄獥浣撶殑浣嶇疆璁剧疆鍒板崟鍏冩牸浣嶇疆
绛旓細鍦ㄥ伐鍏锋爮涓坊鍔犱竴涓嚜瀹氫箟鎸夐挳 鐒跺悗鍐欎竴涓繃绋嬶紝鐢 绐椾綋.SHOW 鏂规硶鏄剧ず绐椾綋 鍐嶅皢鑷畾涔夋寜閽殑瀹忔寚瀹氫负璇ヨ繃绋嬪嵆鍙
绛旓細vba涓鐨勭獥浣鏄剧ず鍦╯heet鐣岄潰鍙互閫氳繃灏員op鍜孡eft鐨勫煎垎鍒缃负Sheet鐨凾op鍜孡eft鏉ュ皢UserForm鏄剧ず鍦⊿heet鐨勭晫闈傛牴鎹煡璇㈢浉鍏冲叕寮淇℃伅鏄剧ず锛氫娇鐢ˋctiveWindow瀵硅薄鏉ヨ幏鍙栧綋鍓嶆椿鍔ㄧ獥鍙g殑浣嶇疆鍜屽ぇ灏忥紝骞跺皢UserForm鐨凾op鍜孡eft灞炴ц缃负褰撳墠绐楀彛鐨勪腑蹇冧綅缃傝繖鏍凤紝褰揢serForm鏄剧ず鏃讹紝瀹冨皢浣嶄簬Sheet鐣岄潰鐨勬涓績浣嶇疆銆
绛旓細寰堢畝鍗曪紝鎶奤serForm绐椾綋鐨StartUpPosition杩欎釜灞炴ц缃负鎵鏈夎呬腑蹇冿紝閭d箞姣忔灏卞湪Excel鐨勬涓績锛佸鏋滃疄鍦ㄤ綘涓嶆弧鎰忥紝灏辨妸startUpPosition杩欎釜灞炴ц缃负鎵嬪姩锛岀劧鍚庣敤浠g爜鎺у埗绐椾綋鏄剧ず鐨勪綅缃紝浠g爜濡備笅锛歅rivate Sub UserForm_Initialize() Me.Top = [a10].Top + 280 '杩欎釜琛ㄧず涓嶢10鍗曞厓鏍煎悓楂橈紝娉ㄦ剰锛屼负浠...
绛旓細1銆丄LT + F11 2銆佸伐鍏封斺旈檮鍔犳帶浠 鍕鹃 Microsot Listciew Control,version 6.0 3銆佸湪宸ュ叿绠绐椾綋涓婄偣鍑诲垰鎵嶉檮鍔犵殑Listview鎺т欢锛屽湪鐨勮璁$獥浣撴寜闇瑕佺敾鍑鸿〃鏍煎ぇ灏 4銆佸弻鍑籐istview1,鏍规嵁闇瑕佸啓鍏ヤ唬鐮
绛旓細涓ょ鏂规硶 鍦ㄥ乏涓婁晶鐨勫伐绋嬬鐞嗙獥鍙e唴锛岄変腑绐椾綋瀵瑰簲鐨勭洰褰 鐒跺悗鐐硅彍鍗曟爮鐨勬枃浠讹紝涓嬫媺鑿滃崟閫夆滃鍑烘枃浠垛濓紝ok 鎴栬呯洿鎺trl+E 鐗瑰埆鎻愰啋锛屾湁鏃朵細瀵煎嚭涓や釜鏂囦欢锛岋紙鍏朵腑涓涓槸闄勫睘鏂囦欢锛夊鏋滈渶瑕佸鍏ユ椂锛屽埌鍏朵腑涓涓紝鍙︿竴涓細鑷姩琚鍏 甯屾湜鎴戠殑鍥炵瓟瀵逛綘鑳芥湁鎵甯姪 浣犺鐨勭獥浣鏄繖涓獥浣撳惂锛燂紝锛屼笉瑕佹悶閿...
绛旓細鎴戠殑鎬濊矾锛氬湪鑿滃崟閲屾坊鍔犱竴涓嚜瀹氫箟鎸夐挳锛屾寚瀹氫竴涓畯锛岃繖涓畯鍐嶈皟鐢绐椾綋鐨show
绛旓細鍦╒BA绐楀彛鍙屽嚮宸︿晶鍒楄〃妗嗙殑thisworkbook鍦ㄥ彸杈圭獥鍙g矘璐翠笅闈㈢殑浠g爜PrivateSubWorkbook_Open()userform1.show'濡傛灉浣犳洿鏀逛簡绐椾綋鐨勫悕绉伴偅灏辨敼涓虹獥浣撳悕绉.showEndSub杩欐牱鎵撳紑杩欎釜宸ヤ綔钖勫氨鐩存帴璋冪敤浣犲缓鐨勭獥浣.杩樻湁涓绉嶅氨鏄垱寤轰竴涓繃绋嬪畯璋冪敤,鍙互鍐欏湪浠绘剰宸ヤ綔琛ㄧ殑浠g爜涓垨鑰呮ā鍧椾腑璋冪敤sub鍔犺浇鎿嶄綔绐椾綋()userform1....
绛旓細灏辨槸鍦╯how鍚庨潰鍔犱釜1锛氫緥濡傦細sub auto_open()formname.show 1 end sub 濡傛灉鏄痜romname.show 0 鎴栬協ormname.show鍒绐椾綋涓嶄細寮哄埗鍦ㄦ渶鍓嶉潰 濡傛灉鎯冲彧鏄剧ず绐椾綋锛孍XCEL闅愯棌锛屽垯鍙氳繃涓嬮潰璇彞鍙互璁剧疆EXCEL涓轰笉鍙锛屽彧鏄剧ず绐椾綋锛歱rivate sub From_Load()application.visible=false end sub ...
绛旓細with sheets("涔︾睄鍊熼槄娴佹按璐")EmptyRow = .Cells(Rows.Count, 1).End(xlUp).Row + 1 .Cells(EmptyRow, 1) = cbSJMC.Text .Cells(EmptyRow, 6) = cbJSR.Text .Cells(EmptyRow, 7) = DTPicker1 .Cells(EmptyRow, 8) = cbJSTS.Text end with ...