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

2­Óvba°ÝÃD

2­Óvba°ÝÃD

1.  §Ú¼g¤F¤@­Ó  ¦C¦L1¦¸.   ¦ý¦p¦ó¥[¦h1¥y  if §ä¤£¨ì¦C¦L¾÷ ´N¥X msgbox§ä¤£¨ì¦C¦L¾÷ end.

2. ¦p¦ó¼g  a1=2010/8/7   b1=11:45   ·ía1©Mb1=¹q¸£ªº®É¶¡ ®É  excel´N·|µo¥Xmusic ©M¼u¥X  msgbox ®É¶¡¨ì (excel ³Ì²Ó¤Æ®É,¥i¥H¥Omsgbox¦b®à­±¥k¤U¨¤¨£¨ì)

½Ð¤j¤jªù«ü¾É><
50 ¦r¸`¥H¤º
¤£¤ä«ù¦Û©w¸q Discuz! ¥N½X

¥»©«³Ì«á¥Ñ Hsieh ©ó 2010-8-7 23:45 ½s¿è

¦^´_ 1# basarasy
  1. Sub NN()
  2. If IsNumeric(Application.Match(Split(ActivePrinter, " on")(0), Printer_List, 0)) Then
  3. ActiveSheet.PrintOut
  4. Else
  5. MsgBox "§ä¤£¨ì¦Lªí¾÷"
  6. End If
  7. End Sub
  8. Function Printer_List() As Variant
  9. '³]©w¤Þ¥Î¶µ¥ØMicrosoft Shell Controls And Automation
  10. Dim MySh As Shell32.Shell
  11. Dim MyPrinter As Shell32.FolderItem
  12. Dim Ar()
  13. Set MySh = CreateObject("Shell.Application")
  14. For Each MyPrinter In MySh.Namespace(ssfPRINTERS).Items
  15.   If MyPrinter.Name <> "·s¼W¦Lªí¾÷" Then
  16.      ReDim Preserve Ar(s)
  17.        Ar(s) = MyPrinter.Name
  18.        s = s + 1
  19.   End If
  20. Next
  21. Printer_List = Ar
  22. End Function
½Æ»s¥N½X
°ÝÃD2À³¸Ó¬O¥ÑWindows¨Ó±±¨î¥i±qAPI¨ç¼Æ¥h§äµª®×
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 2# Hsieh

ÁÂÁ¤j¤j
¦ý¤£ª¾©ñ¦b¨º¸Ì><

¥i¥H³o¼Ë¼g¶Ü?
Sheet2.Select
if  §ä¤£¨ì¦C¦L¾÷ then
msgbox ¨S¦³¦C¦L¾÷
end
else
ActiveSheet.PrintOut from:=1, To:=1, copies:=1

¬õ¦â¨º¥y§Ú¤£ª¾¦p¦ó¼g><
50 ¦r¸`¥H¤º
¤£¤ä«ù¦Û©w¸q Discuz! ¥N½X

TOP

°õ¦æNN¬Ý¬Ý
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 1# basarasy
²Ä2­Ó°ÝÃD ½Ð¸Õ¸Õ ªþÀÉ



¥¨¶°»Ý¨D.rar (17.35 KB)

TOP

¦^´_ 5# GBKEE

¥Î¤F¤§«á¤£¯àÃö­µ¼Ö><

jhh.JPG (79.48 KB)

jhh.JPG

50 ¦r¸`¥H¤º
¤£¤ä«ù¦Û©w¸q Discuz! ¥N½X

TOP

¦^´_  GBKEE

¥Î¤F¤§«á¤£¯àÃö­µ¼Ö>
basarasy µoªí©ó 2010-8-8 13:33



   ±z¶K¿ù¹Ï..°Ý¨ì²Ä¤@­Ó¦C¦L¾÷ªº°ÝÃD
¾Ç¦p°f¤ô¦æ¦à ¤£¶i«h°h

TOP

¦^´_ 6# basarasy
Hsieh ªO¥Dªºµ{¦¡½X ­n¥ý '³]©w¤Þ¥Î¶µ¥ØMicrosoft Shell Controls And Automation

µn¥XWINDOWS «á¦A¶i¤J´N¥i¥HÃö³¬
½Ð¦A­«·s¶}±ÒEXCEL ¶i¤J VBA µøµ¡¤¤
¦³¨â³B  ' IE.Visible = True     ½Ð§R±¼  '
°õ¦æ IE.Visible = True  ªºµ{¦¡½X   ¦p¦¹µ{¦¡¦³¿ù»~ ´N¥i¥HÃö³¬

TOP

¦^´_  basarasy
Hsieh ªO¥Dªºµ{¦¡½X ­n¥ý  '³]©w¤Þ¥Î¶µ¥ØMicrosoft Shell Controls And Automation

µn ...
GBKEE µoªí©ó 2010-8-8 14:08


ª©¥D½Ð°Ý±z·Ó±zªº¨BÆJ«á
    µn¥XWINDOWS «á¦A¶i¤J´N¥i¥HÃö³¬
½Ð¦A­«·s¶}±ÒEXCEL ¶i¤J VBA µøµ¡¤¤
¦³¨â³B  ' IE.Visible = True     ½Ð§R±¼  '
°õ¦æ IE.Visible = True  ªºµ{¦¡½X   ¦p¦¹µ{¦¡¦³¿ù»~ ´N¥i¥HÃö³¬

µ{¦¡½X¤£¯à°õ¦æ ¨BÆJ¦³¤£¹ïªº¦a¤è¶Ü?ÁÂÁ±z

¾Ç¦p°f¤ô¦æ¦à ¤£¶i«h°h

TOP

¥»©«³Ì«á¥Ñ GBKEE ©ó 2010-8-8 14:56 ½s¿è

¦^´_ 9# PD961A
§Ú¦³®É¤]·|¸I¨ì ¥i¯à¬O¨t²ÎªºÃö«Y
­«·s¤U¸üÀɮצsÀÉ«á ¸Õ¸Õ¬Ý

§Ú·Q°_¨Ó¤F
³]©w¤Þ¥Îªº¶µ¥Ø¤¤ ->¨ú®ø ¿òº|ªº±M®×

TOP

        ÀR«ä¦Û¦b : ¥@¤W¦³¨â¥ó¨Æ¤£¯àµ¥¡G¤@¡B§µ¶¶ ¤G¡B¦æµ½¡C
ªð¦^¦Cªí ¤W¤@¥DÃD