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

[µo°Ý] EXCEL³]©w¬Y¤é´Á¨ìÀÉ®×µLªk¶}±Ò

¥»©«³Ì«á¥Ñ luhpro ©ó 2015-4-29 21:52 ½s¿è

¦^´_ 30# hueywen_jia
±à...³o°}¤l¤ñ¸û¦£...

¥H¤Uµ{¦¡½X©ñ¦b ThisWorkBook ¤º:
  1. Public Sub §R°£¦Û¤v()
  2.     ThisWorkbook.Saved = True
  3.     ThisWorkbook.ChangeFileAccess Mode:=xlReadOnly
  4.     Kill ThisWorkbook.FullName
  5.     ThisWorkbook.Close SaveChanges:=False
  6. End Sub

  7. Private Sub Workbook_Open()
  8.   If Date > #5/28/2115# Then §R°£¦Û¤v ' ¤µ¤Ñ¬°¦¹¤é´Á®É, §R°£¥»ÀÉ®×, ª`·N : ÀɮקR°£«áµLªk´_­ì, ´ú¸Õ®É½Ð°È¥²¥ý³Æ¥÷¥»ÀÉ®×.
  9. End Sub
½Æ»s¥N½X

TOP

If Date > DateValue("2015/05/01") Then
        MsgBox ("¤w¶W¨Ï¥Î´Á¶¡¡A¤£¥i¨Ï¥Î¡C½Ð¨D§U¶}µoªÌ!!")
        Exit Sub
    End If

    Q1 = Application.InputBox(prompt:="½Ð¿é¤J»s§@ªÌ¦WºÙ¡G")
    If Q1 = "Vercent" Then
    Else: MsgBox "±K½X¿ù»~¡A§Y±N°h¥X¡I"
    ActiveWorkbook.Close savechanges = False
    End If

TOP

¥»©«³Ì«á¥Ñ hueywen_jia ©ó 2015-5-7 00:27 ½s¿è

·PÁÂluhpro¤j¤j,¥i¬O§Ú·Ó±zµ¹ªº1-10¶µªº¦r¦ê©ñ¶i¥h¤£¯à¥Î! ¤@¼Ë¬O©ñThisWorkBook¸ÌªºOPEN¶Ü?
¤p«B

TOP

If Date > DateValue("2015/05/01") Then
        MsgBox ("¤w¶W¨Ï¥Î´Á¶¡¡A¤£¥i¨Ï¥Î¡C½Ð¨D§U¶}µoªÌ!!")
  ...
taiwan16699 µoªí©ó 2015-5-5 16:59



    ¤j¤j~§Ú¤£ª¾¹D¸Ó©ñ­þ­C~¥i¥H¸Ô²Óªº»¡©ú¶Ü? SORRY~§Ú¤£·|BASIC»yªk
¤p«B

TOP

¥»©«³Ì«á¥Ñ luhpro ©ó 2015-5-7 05:36 ½s¿è
·PÁÂluhpro¤j¤j,¥i¬O§Ú·Ó±zµ¹ªº1-10¶µªº¦r¦ê©ñ¶i¥h¤£¯à¥Î! ¤@¼Ë¬O©ñThisWorkBook¸ÌªºOPEN¶Ü?
hueywen_jia µoªí©ó 2015-5-7 00:25



¨ä¹ê¸Ì­±¦³ §R°£¦Û¤v ¸ò ThisWorkBook ªº Open(¶}±Òµ{¦¡®É´N·|°õ¦æ,¦Ó¥¦¦b³]©wªº®É¶¡¨ì®É·|©I¥s §R°£¦Û¤v ³o­Óµ{§Ç) ¨â­Óµ{§Ç.
©³¤U³o¤@¬q´N¬O ThisWorkBook¸ÌªºOPEN µ{§Ç³á.
  1. Private Sub Workbook_Open()

  2.   If Date > #5/28/2115# Then §R°£¦Û¤v ' ¤µ¤Ñ¬°¦¹¤é´Á®É, §R°£¥»ÀÉ®×, ª`·N : ÀɮקR°£«áµLªk´_­ì, ´ú¸Õ®É½Ð°È¥²¥ý³Æ¥÷¥»ÀÉ®×.

  3. End Sub
½Æ»s¥N½X

TOP

¦^´_ 35# luhpro

§Ú·Ó±zªº¤è¦¡,¦ý«o¥X²{¦¹¹ï¸Ü®Ø
   
1

µû¤À¤H¼Æ

    • GBKEE: ¤£»{¯u¾Ç²ßª÷¿ú -2
¤p«B

TOP

¦^´_ 36# hueywen_jia
³o¼Ëªºµo°Ý¤ÓÀH«K¤F  
§i¶D§A½sĶ¿ù»~¥B¦³»¡©ú¬°¦ó¤£¬Ý»¡©ú.VBAªº»¡©ú¯uªº¦³¨º»òÃø²z¸Ñ¶Ü?
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¥»©«³Ì«á¥Ñ luhpro ©ó 2015-5-11 23:38 ½s¿è
¦^´_  luhpro
§Ú·Ó±zªº¤è¦¡,¦ý«o¥X²{¦¹¹ï¸Ü®Ø
hueywen_jia µoªí©ó 2015-5-10 20:59

§Aªº Then «á­±¨S«ü¥O.

If...Then... «ü¥Oªº¨ä¤¤¨âºØ»yªk:
1.
If  ±ø¥ó¦¡ Then ­n°õ¦æªº«ü¥O

(¦¹ªk¬°·í±ø¥ó¦¨¥ß®É,
µ{¦¡·|°õ¦æ Then «á­±ªº«ü¥O,
§_«h¤£°õ¦æ¸Ó«ü¥O,
¥B¤£½×µ²ªG¦p¦ó°õ¦æ§¹²¦«á·|Ä~Äò°õ¦æ¤U¤@¦æªº«ü¥O,
·N§Y If ªº§PÂ_»P°õ¦æ¬O¦b¸Ó¦æ¶]§¹«á´N¤w¸gµ²§ô)

2.
If  ±ø¥ó¦¡ Then
   ­n°õ¦æªº«ü¥O
End If

(¦¹ªk¬°·í±ø¥ó¦¨¥ß®É,
µ{¦¡·|°õ¦æ Then ªº¤U¤@¦æª½¨ì End If «eªº¨C¤@¦æ«ü¥O,
·N§Y If ªº§PÂ_»P°õ¦æ¬O¦b¸Ó¦æ¶}©l°_,
¤@ª½¨ì End If «ü¥O¤~µ²§ô)

»Ý¯d·N¨âºØ»yªkªº®t§O,
Then «á­±¨S«ü¥O®É´N¤@©w­n¦³ End If
¤Ï¤§¥ç¦P.

¬Oªº,·í§A±ø¥ó¦¨¥ß«á¥u»Ý­n°õ¦æ¤@¦æ«ü¥O®É,¥Î²Ä 1 ºØ»yªk´N¥i¥H¤F,
­Y¬°¦h¦æ«hÀ³¥Î²Ä 2 ºØ»yªk.

¥t¥~,§A¦b®M¥Îªº®É­Ô,
À³¸Ó­n¥ý³£¥þ³¡ Copy ¹L¥h,
¦A¨Ì¾Ú§Aªº»Ý¨D°µ½Õ¾ã.

¨Ò¦p§A¥»¨Ó´N¦³ Private Sub Workbook_Open() ®É,
Copy ¹L¥h·|Åܦ¨¦³¨â­Ó Open µ{§Ç,
³o®É´N­n¸ÕµÛ§â¥¦­Ì¾ã¦X¦b¦P¤@­Ó Open µ{§Ç¤º,
¬Ý¬O­n«e«á©ñ,
ÁÙ¬O±N¨ä¤¤¤@­Óµ{§Ç´¡¦b¥t¤@­Óµ{§Çªº¤º³¡.
¦A§R±¼¦hªº¨º¨â¦æ Sub Workbook_Open »P End Sub.

°£«D§A½T¹ê¤w¸g¤F¸Ñ¤F¨º¨Ç«ü¥O¦¡¦b°µ¬Æ»ò,
¤£µM¤£«ØijÀH·N§R´î.

§¹¾ãªº¸Ó¦æ¬O:
If Date > #5/28/2115# Then §R°£¦Û¤v
§R°£¦Û¤v ¦b ' «e¤£¬O¦b¨ä«á,
©Ò¥H¥¦¬O¤@­Ó«ü¥O.
¥B§A¤]­n§â Sub §R°£¦Û¤v ¨ì End Sub ³¡¤À Copy ¹L¥h,
¤£µM¤@¼Ë·|µo¥Í§ä¤£¨ì §R°£¦Û¤v µ{§Çªº¿ù»~.

TOP

¦^´_ 38# luhpro


   
§Ú·Ó¨º¨Ç¦r¦êCOPY¶i¥h¤F,¥i¬O¥¦ÁÙ¬O¥X²{"½sĶ¿ù»~:¨S¦³©w¸q³o­ÓSub©ÎSunciton µM«á¦b§R°£¦Û¤v¨º¤Ï¶Â¤F,¬O§ä¤£¨ì³o­Ó"§R°£¦Û¤v" ¶Ü
¤p«B

TOP

¦^´_  luhpro
§Ú·Ó¨º¨Ç¦r¦êCOPY¶i¥h¤F,¥i¬O¥¦ÁÙ¬O¥X²{"½sĶ¿ù»~:¨S¦³©w¸q³o­ÓSub©ÎSunciton µM ...
hueywen_jia µoªí©ó 2015-5-12 21:13

¬O°Ú,
38# ³Ì¥½§À¦³»¡¤F:
¥B§A¤]­n§â Sub §R°£¦Û¤v ¨ì End Sub ³¡¤À Copy ¹L¥h,
¤£µM¤@¼Ë·|µo¥Í§ä¤£¨ì §R°£¦Û¤v µ{§Çªº¿ù»~.

TOP

        ÀR«ä¦Û¦b : ¡i®É¶¡µLªk¾B¾×¡j©È®É¶¡®ø³u¡Aªá¤F³\¦h¤ß¦å¡A·QºÉ¦U¦¡¤èªk­n¾B¾×®É¶¡¡Aµ²ªG¬O¡G®ö¶O¤F§ó¦h®É¶¡¡A¥B¤@µL©Ò¦¨¡I
ªð¦^¦Cªí ¤W¤@¥DÃD