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

[µo°Ý] VBA«ü©w®æ¤º´¡¤J¹ïÀ³ªº¹Ï¤ù(µ{¦¡½X°Q½×)

[µo°Ý] VBA«ü©w®æ¤º´¡¤J¹ïÀ³ªº¹Ï¤ù(µ{¦¡½X°Q½×)

¦U¦ì¤j¤j­Ì¦n!

¥Ø«e·Q»s§@¯à¦b«ü©w®æ¤º¦Û°Ê´¡¤J¬Û¹ïÀ³¦WºÙªº«È¤áLOGO ( ´¡¤J¹Ï¤ù¤j¤p¤£¯à¶W¹L«ü©w®æªº¤j¤p)¡A­Y¬O§ä¤£¨ì¬Û¹ïÀ³¦WºÙªº¹Ï¤ù±N·|¶}±Ò¸ê®Æ§¨(±Mªù¦s©ñ«È¤áLOGOªº¸ê®Æ§¨)
¦Óµ{¦¡¼¶¼g³¡¤À¹J¨ì¥H¤U°ÝÃD:
1.¤£ºÞ¹Ï¤ù®æ¦¡¦p¦ó¡A¥u­n¹Ï¦W»P«È¤á¦W¬Û²Å´N¯à¦Û°Ê´¡¤J«ü©w®æ¤¤¡A¥Ø«e¼gªk¦p¤U²Ä¤C¦C (X=Dir("")) ¡A¤£ª¾¤j¤j­Ì¬O§_¦³§ó¦n±o¼gªk?
2.¹Ï¤ù´¡¤Jªº¦a¤è¦³¤­­Ó³¡¥÷¡Aªí®æ¤j¤p³£¤£¤@¼Ë¡A¤£ª¾¬O§_¯à«ü©w¹Ï¤ù¤j¤p»PÀx¦s®æ¤j¤p¬Û¦P?
3.¦p¦óÂà¼g¶}±Ò«ü©w¸ê®Æ§¨   ((( S:archiv\LOGO
¥H¤W! ·PÁ¦U¦ì¤j¤j!!
µ{¦¡½X¦p¤U:(¥Ñ©óÁ٨Ϸs¤â¡A­Y»yªk¦³¿ù¦A³Â·Ð¤j¤j­ÌªÈ¥¿§Ú¤@¤U)
  1. Sub Logo()

  2. If Sheets("Grunddefinition").Range("T5").Value <> 0 Or Sheets("Grunddefinition").Range("T5").Value <> "" Then

  3.    Dim A As String
  4.     A = Application.IfError(Application.VLookup(Sheets("Grunddefinition").Range("S5"), Sheets("Grunddefinition").Range("S5:T5"), 2, False), "")

  5.     Dim x As String
  6.     x = Dir("S:archiv\LOGO\" & A & ".png") 'Or x = Dir("S:archiv\LOGO\" & A & ".jpg")
  7.       
  8.       If x <> "" Then
  9.       
  10.          Set p = ActiveSheet.Pictures.Insert("S:archiv\LOGO\" & A & ".png") 'Or x = Dir("S:archiv\LOGO\" & A & ".jpg")
  11.          Set C = Sheets("Grunddefinition").Range("S1") And Sheets("Zeitablaufplan").Range("B5") And Sheets("Zeitablaufplan").Range("M5") And Sheets("Zeitablaufplan").Range("X5") And Sheets("Zeitablaufplan").Range("AI5")
  12.          
  13.    
  14.       
  15.       ElseIf x = "" Then
  16.       MsgBox "Error! Can't find the corresponding picture!"
  17.       MsgBox "You should check whether the picture is existing in the folder of Logo or check the name of the picture is corresponded with the name of customer!"
  18.       
  19. End If

  20. ElseIf Sheets("Grunddefinition").Range("T3").Value = 0 Or Sheets("Grunddefinition").Range("T3").Value = "" Then
  21. MsgBox "Please enter the name of the customer!"
  22. Sheets("Grunddefinition").Select
  23. Rows(5).Select
  24. End If


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

¦^´_ 1# liebe

§A³o»yªk¿ù»~ set ÅܼÆ=ª«¥ó, ª«¥ó¥u¯à¬O¤@­Ó
  1. Set C = Sheets("Grunddefinition").Range("S1") And Sheets("Zeitablaufplan").Range("B5") And Sheets("Zeitablaufplan").Range("M5") And Sheets("Zeitablaufplan").Range("X5") And Sheets("Zeitablaufplan").Range("AI5")
½Æ»s¥N½X
Ãö©ó¹Ï¤ùªº¶×¤J,½Ð¥Î¥»°Q½×ª©ªº·j¯Á¥\¯à,·j¯Á ÃöÁä¦r"Pictures"¥»ª©¦³³\¦h°Q½×
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

        ÀR«ä¦Û¦b : ¦³¦h¤Ö¤O¶q´N°µ¦h¤Ö¨Æ¡A¤£­n¤ß¦sµ¥«Ý¡Aµ¥«Ý¤~·|¸¨ªÅ¡C
ªð¦^¦Cªí ¤W¤@¥DÃD