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

[µo°Ý] °}¦C¯Á¤Þ¶W¥X½d³ò¤@°Ý!!

[µo°Ý] °}¦C¯Á¤Þ¶W¥X½d³ò¤@°Ý!!

°²³]¦b§Úªºworkbook©³¤U§Ú¥u¦³sheet(1), sheet(2), sheet(3)³o¤T­Ósheets
Run¤U­±³o­Ócode®É¡A§ÚÅý¥¦µ¥©ósheet(4)µM«á¸õ¥X¤U­±³o­ÓMsgBox
¦ý¬O¡A§Ú¶]¨ìSet A = Sheets(4)®É·|¸õ¥X "°õ¦æ¶¥¬q¿ù»~9 °}¦C¯Á¤Þ¶W¥X½d³ò"
µM«á´N¤¤Â_¤F¡A¤]¤£·|¦L¥XMsgBoxªº¤º®e
½Ð°Ý°£¤FOn Error Resume NextÁÙ¦³¤°»ò¤èªk¥i¥H¸Ñ¨M©O

ÁÂÁÂ!!

'On Error Resume Next
Dim A As Worksheet

Set A = Sheets(4)
If A Is Nothing Then
    res = MsgBox("§ä¤£¨ì¸Ósheet" & vbCrLf & "°Ê§@¤¤¤î", vbOKOnly + vbCritical)
    Exit Sub
End If

¥»©«³Ì«á¥Ñ GBKEE ©ó 2011-11-23 15:37 ½s¿è

¦^´_ 1# lorlcool
'On Error Resume Next   «e­±ªº¬õÂI¬Oµù¸Ñ µ{¦¡´N¤£·|°õ¦æ
  1. Option Explicit
  2. Sub Ex()
  3.     Dim A As Worksheet
  4.     On Error Resume Next
  5. AA:
  6.     Set A = Sheets(4)
  7.     If A Is Nothing Then
  8.         If MsgBox("§ä¤£¨ì¸Ósheet" & vbCrLf & "°Ê§@¤¤¤î", vbYesNo + vbCritical) = vbYes Then
  9.             Exit Sub
  10.         Else
  11.             GoTo BB:
  12.         End If
  13.     End If
  14.     Exit Sub
  15. BB:
  16.     Sheets.Add , Sheets(Sheets.Count)
  17.     GoTo AA
  18. End Sub
½Æ»s¥N½X

TOP

¦^´_ 2# GBKEE


·PÁ¤j¤jªº«ü¾É
§Úª¾¹D«e­±ªº" ' "¬Oµù¸Ñªº·N«ä
§Ú·Qª¾¹D °£¤FOn Error Resume Next¤§¥~
¦³¿ìªk¸Ñ¨M³o­Ó°ÝÃD¶Ü?
ÁÂÁÂ!

TOP

¦^´_ 3# lorlcool
¨º¬O³o¼Ë¶Ü?
  1. Sub Ex()
  2.     Dim A As Worksheet, i As Integer
  3.     i = 4
  4.     If i > Sheets.Count Then
  5.      MsgBox "§ä¤£¨ì¸Ósheet" & vbCrLf & "°Ê§@¤¤¤î", vbOKOnly + vbCritical
  6.         Exit Sub
  7.     Else
  8.         Set A = Sheets(i)
  9.     End If
  10. End Sub
½Æ»s¥N½X

TOP

¦^´_ 4# GBKEE


¶â¶â ¤j·§´N¬O³o­Ó·N«ä

ÁÂÁ¤j¤jÅo

§Ú­n¨Ó®ø¤Æ¤@¤U ·P®¦

TOP

        ÀR«ä¦Û¦b : §Ú­Ì­n°µ¦nªÀ·|ªºÀô«O¡A¤]­n°µ¦n¤º¤ßªºÀô«O¡C
ªð¦^¦Cªí ¤W¤@¥DÃD