Excel VBA ¦p¦ó¦Û°Ê½Õ¾ãªí³æ¤j¤p
- ©«¤l
- 103
- ¥DÃD
- 30
- ºëµØ
- 0
- ¿n¤À
- 139
- ÂI¦W
- 0
- §@·~¨t²Î
- wondows XP
- ³nÅ骩¥»
- office 2007
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¹ü¤Æ
- µù¥U®É¶¡
- 2013-2-21
- ³Ì«áµn¿ý
- 2015-6-26
|
Excel VBA ¦p¦ó¦Û°Ê½Õ¾ãªí³æ¤j¤p
·Q½Ð°Ý¤@¤U¤j¤j
¤§«eVBAªí³æ¼g¦n«á
¥»¨ªí³æn¶ñ¼gªº¤º®e¸û¦h
¥H¥Ø«e¤@¯ë22¦T¿Ã¹õ¬ÝÁÙOK
¦ý¬O´«¨ìµ§¹q¤W±
µo²{ªí³æ¶}±Ò«á
³Ì¤U±ªº«öÁä´N«ö¤£¨ì¤F
¦³¿ìªk§Q¥Î·Æ¹«±Nªí³æ¤j¤pµ¥¤ñÁY¤p¶Ü?
¦]¬°§Ú§Q¥Î«öÁäÁY¤p
§ïÅܤFªí³æ¤j¤p
¦ý¬O¤º®e¨S¦³µ¥¤ñÁY¤p- Sub ³]©w¦Ûqªí³æªº¤Ø¤o()
- MsgBox ¡§±NUserForm1ªº°ª«×»P¼e«×¦U©ñ¤j1.5¿¡¨
- takasa = UserForm1.Height
- haba = UserForm1.Width
- UserForm1.Height = takasa * 3/2
- UserForm1.Width = haba * 3/2
- UserForm1.Show
- MsgBox ¡§¦^´_ì¨Óªºª¬ºA¡¨
- UserForm1.Height = takasa
- UserForm1.Width = haba
- End Sub
½Æ»s¥N½X ¦³¨ä¥L¸Ñ¨M¤è¦¡
¥i¥H¸Ñµª§ÚªººÃ´b©O? ·P¿E¤£ºÉ >//< |
|
Jared
|
|
|
|
|
- ©«¤l
- 1018
- ¥DÃD
- 15
- ºëµØ
- 0
- ¿n¤À
- 1058
- ÂI¦W
- 0
- §@·~¨t²Î
- win7 32bit
- ³nÅ骩¥»
- Office 2016 64-bit
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ®ç¶é
- µù¥U®É¶¡
- 2012-5-9
- ³Ì«áµn¿ý
- 2022-9-28
|
¦^´_ 1# Jared
´£¨Ñ¤@Ó¤èªk¡A®Ú¾Úªí³æªº½ÆÂø«×¡A®ÄªG¥i¯à¤£¤@©w«Ü¦n¡A¨Ñ§A°Ñ¦Ò¡G
¦b¸Óªí³æªºµ{¦¡½X¥[¤W¤U±Code¡A¶}±Òªí³æ«á¡A¦bªí³æ¤W«ö¡G
Ctrl+·Æ¹«¥ªÁä©ì¦²¦V¤W¡A¥i©ñ¤jªí³æ
Ctrl+·Æ¹«¥ªÁä©ì¦²¦V¤U¡A¥iÁY¤pªí³æ- Private Sub UserForm_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
- Static lastY As Single
-
- If Button = 1 And Shift = 2 Then
- If Y - lastY > 5 Then
- ResizeUserform 1.1
- lastY = Y
- ElseIf lastY - Y > 5 Then
- ResizeUserform 0.9
- lastY = Y
- End If
- End If
- End Sub
- Private Sub ResizeUserform(dSizeCoeff As Double)
- Dim c
- With Me
- .Width = .Width * dSizeCoeff
- .Height = .Height * dSizeCoeff
-
- For Each c In .Controls
- With c
- .Top = .Top * dSizeCoeff
- .Left = .Left * dSizeCoeff
- .Width = .Width * dSizeCoeff
- .Height = .Height * dSizeCoeff
-
- On Error Resume Next
- .Font.Size = .Font.Size * dSizeCoeff
- On Error GoTo 0
- End With
- Next
- End With
- End Sub
½Æ»s¥N½X |
|
|
|
|
|
|
- ©«¤l
- 5923
- ¥DÃD
- 13
- ºëµØ
- 1
- ¿n¤À
- 5986
- ÂI¦W
- 0
- §@·~¨t²Î
- win10
- ³nÅ骩¥»
- Office 2010
- ¾\ŪÅv
- 150
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¥xÆW°ò¶©
- µù¥U®É¶¡
- 2010-5-1
- ³Ì«áµn¿ý
- 2022-1-23
|
¦^´_ 2# stillfish00
¥[¤W¥iÁÙì(ì¨Óªº¤j¤p)- Option Explicit
- Dim xME()
- Private Sub UserForm_Initialize()
- Dim i As Integer, e As Variant
- ReDim xME(0 To Controls.Count)
- xME(0) = Array(Top, Left, Height, Width, Font.Size)
- For Each e In Controls
- With e
- i = i + 1
- xME(i) = Array(.Top, .Left, .Height, .Width, .Font.Size)
- End With
- Next
- End Sub
- Private Sub UserForm_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
- Dim i As Integer, e As Variant
- Static lastY As Single
- Debug.Print Shift
- If Button = 1 And Shift = 2 Then
- If Y - lastY > 5 Then
- ResizeUserform 1.1
- lastY = Y
- ElseIf lastY - Y > 5 Then
- ResizeUserform 0.9
- lastY = Y
- End If
- ElseIf Button = 2 And Shift = 2 Then '«ö¤U¥kÁä
- Top = xME(0)(0)
- Left = xME(0)(1)
- Height = xME(0)(2)
- Width = xME(0)(3)
- Font.Size = xME(0)(4)
- For Each e In Controls
- With e
- i = i + 1
- .Top = xME(i)(0)
- .Left = xME(i)(1)
- .Height = xME(i)(2)
- .Width = xME(i)(3)
- .Font.Size = xME(i)(4)
- End With
- Next
- End If
- End Sub
½Æ»s¥N½X |
|
|
|
|
|
|
- ©«¤l
- 1018
- ¥DÃD
- 15
- ºëµØ
- 0
- ¿n¤À
- 1058
- ÂI¦W
- 0
- §@·~¨t²Î
- win7 32bit
- ³nÅ骩¥»
- Office 2016 64-bit
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ®ç¶é
- µù¥U®É¶¡
- 2012-5-9
- ³Ì«áµn¿ý
- 2022-9-28
|
¦^´_ 3# GBKEE
¤Ó¦n¤F¡A§ÚÁÙ¤@ª½¦b·Q¾Þ§@¤Ó¦h¦¸¦r«¬¥i¯à·|Åܱ¼¡C
ÁÙì¬OÓ¦n¥D·N¡I |
|
|
|
|
|
|
- ©«¤l
- 605
- ¥DÃD
- 92
- ºëµØ
- 0
- ¿n¤À
- 648
- ÂI¦W
- 0
- §@·~¨t²Î
- windows
- ³nÅ骩¥»
- 7
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- ¨Ó¦Û
- macau
- µù¥U®É¶¡
- 2013-4-5
- ³Ì«áµn¿ý
- 2019-2-10
|
|
ss
|
|
|
|
|
- ©«¤l
- 103
- ¥DÃD
- 30
- ºëµØ
- 0
- ¿n¤À
- 139
- ÂI¦W
- 0
- §@·~¨t²Î
- wondows XP
- ³nÅ骩¥»
- office 2007
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¹ü¤Æ
- µù¥U®É¶¡
- 2013-2-21
- ³Ì«áµn¿ý
- 2015-6-26
|
¦^´_ 3# GBKEE
·PÁ¤j¤jªºÀ°¦£¡A¤S¾Ç¨ì¤F¤@©Û |
|
Jared
|
|
|
|
|
- ©«¤l
- 103
- ¥DÃD
- 30
- ºëµØ
- 0
- ¿n¤À
- 139
- ÂI¦W
- 0
- §@·~¨t²Î
- wondows XP
- ³nÅ骩¥»
- office 2007
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¹ü¤Æ
- µù¥U®É¶¡
- 2013-2-21
- ³Ì«áµn¿ý
- 2015-6-26
|
¦^´_ 2# stillfish00
ªGµMªí³æ¤Ó½ÆÂø¤]¤£¦æ¡A¦ýÁÙ¬O·PÁ¤j¤jÀ°¦£^^ |
|
Jared
|
|
|
|
|
- ©«¤l
- 103
- ¥DÃD
- 30
- ºëµØ
- 0
- ¿n¤À
- 139
- ÂI¦W
- 0
- §@·~¨t²Î
- wondows XP
- ³nÅ骩¥»
- office 2007
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- ¨Ó¦Û
- ¹ü¤Æ
- µù¥U®É¶¡
- 2013-2-21
- ³Ì«áµn¿ý
- 2015-6-26
|
¦^´_ 3# GBKEE
¸Õ¤F¤@¤U¡A¦pªGnÁÙì¬On«öþÓ«öÁä¡H>\< |
|
Jared
|
|
|
|
|