ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[µo°Ý] ¦p¦ó¸T¤î¨Ï¥ÎVBA«ö¶s

[µo°Ý] ¦p¦ó¸T¤î¨Ï¥ÎVBA«ö¶s

½Ð°Ý§Ú¦b¤@­Ó¬¡­¶³¡¤º, ¦³¤@­Ó¤u§@ªí"¥Ø¿ý"¬O¦³«ö¶s¨Ã³]¦³¥¨¶°, ¦]¬¡­¶³¡¦³¦h¤H¨Ï¥Î, §Ú±N¤u§@ªí"¥Ø¿ý"«OÅ@, ¦ý¤´¬O¥i¥H«öÁä°õ¦æ¥¨¶°, ¥u¬O¤£¯à­×§ï¤u§@ªí¤º®e.

½Ð°Ý°£¤FÁôÂäu§@ªí¥~, ©|¦³¬Æ»ò¤èªk?

½Ð½ç±Ð!

¥»©«³Ì«á¥Ñ koo ©ó 2015-10-24 16:39 ½s¿è

«Øij¤@¤U:¿é¤J¹ï¤F´N°õ¦æµ{§Ç..¿é¤J¿ù»~´NÂ÷¶}Sub
¦A§âµ{§Ç¤WÂê
¤£µM·|¦³"«ö¶s¤´¬O¦Ç¦â"°ÝÃD
  1. Private Sub CommandButton1_Click()
  2. x = InputBox("½Ð¿é¤J±K½X", "±K½X")
  3. If x = 12345 Then
  4.     Call Splitbook
  5. Else
  6.     MsgBox "¿é¤J¿ù»~"
  7.     Exit Sub
  8. End If
  9. End Sub

  10. Sub Splitbook()
½Æ»s¥N½X

TOP

¦^´_ 13# lpk187


¦hÁ«ü¾É!

TOP

¦^´_ 9# missbb


    §AÀ³¸Ó¬Ý²M·¡2¼Óªº¸Ñ»¡¡A
CommandButton1.Enabled = False'¬°¤£¥i¨Ï¥Î¡A·|Åܦ¨¦Ç¦âªº
CommandButton1.Enabled =True'¬°¥i¨Ï¥Î¡A·|¦¨¬°¥¿±`¥i¨Ï¥Î±¡ªp
¡A¦Ó2¼Óªº¨Ò¤l
¦b Workbook_Open®É¡A·|Ãö³¬«ö¶sªº¨Ï¥Î¡Aª½¨ì°õ¦æpasµ{¦¡®É¤è¥i¸Ñ¶}«ö¶sªº¨Ï¥Î
Private Sub Workbook_Open()
Worksheets("¤u§@ªí1").CommandButton1.Enabled = False
End Sub
¤U¦A§Q¥Î¥¨¶°¨Ó±Ò¥Î¥¦
Private Sub pas_Click()
  aa = InputBox("½Ð¿é¤J±K½X")
pass = "12345"
If aa = pass Then
    CommandButton1.Enabled = True'±K½X¹ï®É¡A«hCommandButton1«ö¶sÅÜ¥i¥H¨Ï¥Î¡A
Else
    CommandButton1.Enabled = False'±K½X¿ù»~®É¡A«hCommandButton1«hºû«ù¤£²Õ¨Ï¥Î¡A«ö¶s¬°¦Ç¦âªº
    MsgBox "¿ù»~¿é¤J"
    Exit Sub'±K½X¿ù»~®É¸õ¥Xµ{¦¡¡A¬Æ¦Ü¤£¯à°õ¦æ¤U­±µ{¦¡
End If

...
...
...

End Sub
³oµ{¦¡¨Ò¤l¡A¬O»¡©ú¡A·í¥´¶}Àɮ׮ɡACommandButton1«ö¶s¬°¤£¥i¥H¨Ï¥Î¡A
ª½¨ì¨Ï¥ÎªÌ¡A«ö¤Upas «ö¶s®É¡A±K½X¹ï®É¡A¤~¥i¥H¨Ï¥ÎCommandButton1«ö¶s¡AÄ~Äò¥i¥H¨Ï¥Î¨ä¥L¥¨¶°µ{¦¡§_«h¬°«OÅ@ª¬ºA¡I¦p¤U¹Ï¡G
¶}±ÒÀɮ׮ɡACommandButton1«ö¶s¬°¤£¦ó¨Ï¥Îª¬ºA

¤U¹Ï«h¬°¡A±K½X¿é¤J¹ï«á¥i¨Ï¥Îª¬ºA

TOP

¦^´_ 11# ­ã´£³¡ªL

¦¨¥\¤F, ·PÁ«ü¾É.

TOP

Sub Splitbook()
AA = InputBox("½Ð¿é¤J±K½X")
If AA = "" Then Exit Sub
If AA <> "12345" Then MsgBox "¡°±K½X¿ù»~! ": Exit Sub
¡@
¡ã¡ã±µ¥t¦sÀɵ{¦¡½X¡ã¡ã
End Sub

±K½X¥¼¿é¤J©Î¿ù»~¡Aª½±µ¸õ¶}¡A¤£»Ý¹ï«ö¶s¥t§@³B²z¡ã¡ã

TOP

¦^´_ 7# GBKEE

©êºp¥´ÂZ¤F, ¸Õ¤F¨â¦ì¤j¤jªº¤èªk, ©|¦³¤p°ÝÃD:

GBKEEªº¤èªk, ±K½X¹ï®ÉµL°ÝÃD, ¦ý¦p±K½X¿ù»~«á, ¤´·|°õ¦æ.

Lpk187ªº¤èªk, ¤£½×±K½X¹ï®ÉµL°ÝÃD, ¦ý°õ¦æVBA«á«ö¶sÅܦÇ, Ãö³¬ÀɮצA¶}, «ö¶s¤´¬O¦Ç¦â. ¦p±K½X¿ù»~«á, «ö¶sÅܦÇ, Ãö³¬ÀɮצA¶}, «ö¶s¤´¬O¦Ç¦â.

TOP

¦^´_ 8# lpk187

©êºp¥´ÂZ¤F, ¸Õ¤F¨â¦ì¤j¤jªº¤èªk, ©|¦³¤p°ÝÃD:

GBKEEªº¤èªk, ±K½X¹ï®ÉµL°ÝÃD, ¦ý¦p±K½X¿ù»~«á, ¤´·|°õ¦æ.

Lpk187ªº¤èªk, ¤£½×±K½X¹ï®ÉµL°ÝÃD, ¦ý°õ¦æVBA«á«ö¶sÅܦÇ, Ãö³¬ÀɮצA¶}, «ö¶s¤´¬O¦Ç¦â. ¦p±K½X¿ù»~«á, «ö¶sÅܦÇ, Ãö³¬ÀɮצA¶}, «ö¶s¤´¬O¦Ç¦â.

TOP

¦^´_ 6# missbb


    aa = InputBox("½Ð¿é¤J±K½X")
pass = "12345"
If aa = pass Then
    CommandButton1.Enabled = True
Else
    CommandButton1.Enabled = False
    MsgBox "¿ù»~¿é¤J"
    Exit Sub
End If

TOP

¦^´_ 6# missbb
¸Õ¸Õ¬Ý
  1. aa = InputBox("½Ð¿é¤J±K½X")
  2.     pass = "12345"
  3.     If aa = pass Then
  4.         CommandButton1.Enabled = False
  5.     ElseIf aa <> pass Then
  6.         MsgBox "¿ù»~¿é¤J"
  7.         CommandButton1.Enabled = True
  8.     End If
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

        ÀR«ä¦Û¦b : ¥Ç¿ù¥XÄb®¬¤ß¡A¤~¯à²M²bµL·Ð´o¡C
ªð¦^¦Cªí ¤W¤@¥DÃD