- ©«¤l
- 28
- ¥DÃD
- 20
- ºëµØ
- 0
- ¿n¤À
- 70
- ÂI¦W
- 0
- §@·~¨t²Î
- windows
- ³nÅ骩¥»
- Office2010
- ¾\ŪÅv
- 20
- ©Ê§O
- ¤k
- µù¥U®É¶¡
- 2017-7-4
- ³Ì«áµn¿ý
- 2018-8-13
|
[µ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)¡AY¬O§ä¤£¨ì¬Û¹ïÀ³¦WºÙªº¹Ï¤ù±N·|¶}±Ò¸ê®Æ§¨(±Mªù¦s©ñ«È¤áLOGOªº¸ê®Æ§¨)
¦Óµ{¦¡¼¶¼g³¡¤À¹J¨ì¥H¤U°ÝÃD:
1.¤£ºÞ¹Ï¤ù®æ¦¡¦p¦ó¡A¥un¹Ï¦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¤â¡AY»yªk¦³¿ù¦A³Â·Ð¤j¤j̪ȥ¿§Ú¤@¤U)- Sub Logo()
-
- If Sheets("Grunddefinition").Range("T5").Value <> 0 Or Sheets("Grunddefinition").Range("T5").Value <> "" Then
-
- Dim A As String
- A = Application.IfError(Application.VLookup(Sheets("Grunddefinition").Range("S5"), Sheets("Grunddefinition").Range("S5:T5"), 2, False), "")
- Dim x As String
- x = Dir("S:archiv\LOGO\" & A & ".png") 'Or x = Dir("S:archiv\LOGO\" & A & ".jpg")
-
- If x <> "" Then
-
- Set p = ActiveSheet.Pictures.Insert("S:archiv\LOGO\" & A & ".png") 'Or x = Dir("S:archiv\LOGO\" & A & ".jpg")
- 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")
-
-
-
- ElseIf x = "" Then
- MsgBox "Error! Can't find the corresponding picture!"
- 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!"
-
- End If
- ElseIf Sheets("Grunddefinition").Range("T3").Value = 0 Or Sheets("Grunddefinition").Range("T3").Value = "" Then
- MsgBox "Please enter the name of the customer!"
- Sheets("Grunddefinition").Select
- Rows(5).Select
- End If
- End Sub
½Æ»s¥N½X |
|