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

[µo°Ý] icon¸ô®|°ÝÃD

[µo°Ý] icon¸ô®|°ÝÃD

½Ð°Ý¦U¦ì¤j¤j

¤p§Ì¦³­Ó¥¨¶°

¥i¥H±NÀɮתþ¨ìExcel¸Ì­±

¬O¥H¹Ï¥Üªº¤è¦¡¶K¤W¡A¨Ã­×§ï¦¨¯S©w¦WºÙ

¦ý¥Ñ¨ä¥L¤H¨Ï¥Î®Éµo²{µLªk¶¶§Q¥H¹Ï¥ÜÅã¥Ü

«á¨Ó¤~µo²{­ì¨Ó¬Oiconªº¸ô®|¤£¦P

¤U¤èºI¨ú³¡¤Àµ{¦¡½X
  1. ActiveSheet.OLEObjects.Add(filename:=filename1, Link:=False, Link:=False, _
  2.                     DisplayAsIcon:=True, IconFileName:= _
  3.                     "C:\WINDOWS\Installer\{AC76BA86-7AD7-1028-7B44-A93000000001}\PDFFile_8.ico", _
  4.                     IconIndex:=0, IconLabel:=icon_name1).Select
½Æ»s¥N½X
½Ð°Ý¤£¦P¹q¸£¨Ï¥Î®É¡A¯à§_¦Û°Ê§P§Oiconªº¸ô®|

¤£¥Î¯S§O¥h­×§ï

ÁÂÁ¡I¡I¡I
¥Î¥\¨ì¥@¬É¥½¤é¨º¤@¤Ñ¡ã¡ã¡ã

ActiveSheet.OLEObjects.Add(filename:=filename1, Link:=False, Link:=False, _
                    DisplayAsIcon:=True, IconFileName:= _
                    Environ("Windir")+"\{AC76BA86-7AD7-1028-7B44-A93000000001}\PDFFile_8.ico", _
                    IconIndex:=0, IconLabel:=icon_name1).Select

TOP

¦^´_ 1# li_hsien
¦³¨âºØ¤èªk¥i¥H¹F¦¨,
¤@ºØ¬O°Ñ¦Ò³o¤@½g : ½Ð°Ý¦p¦ó¦b"¤å¦r¤è¶ô"¿é¤J±ø¥ó«á¦A¥h·j´M¸ê®Æ
¹ï C:\Windows\Installer ©³¤Uªº¨C­Ó¤l¥Ø¿ý,
·j´M PDFFile_8.ico ÀÉ®×(­Y­n§Ö¨Ç¥i¥HÂo±¼«D { ¶}ÀYªº¥Ø¿ý)

¦ý§Ú¤£«Øij¥Î¦¹¤è¦¡,
¦]¬° Installer ¥Ø¿ý¸Ì­±ªºÀɮ׬O¦b¦w¸Ë¹Lµ{¤¤²£¥Íªº,
¸Ì­±¤j³¡¤ÀªºÀÉ®×¥i¯à¦b¦w¸Ë§¹«á´N¦A¤]¤£·|¨Ï¥Î,
©Ò¥H¦³¨Ç©U§£¸ê®Æ²M°£¥\¯à©Î¤u¨ã¥i¯à·|²M±¼³o¨ÇÀÉ®×.
¦Ó¥B¨C¦¸³£­n·j´MInstaller ©³¤Uªº¨C­Ó¤l¥Ø¿ý§ä¸ÓÀɮפ]«Ü¨S¦³®Ä²v.

§Ú¸û«Øij¤è¦¡´N¬O§â³o­Ó Icon ÀÉ®× Copy ¨ì¬Y­Ó¥Ø¿ý¤U,
¥i¥H¦Û«Ø¤@­Ó¥Ø¿ý,
©Î¬O°®¯Ü¸ò Excel ÀÉ©ñ¦b¦P­Ó¥Ø¿ý¤U,(¥i¥H¥Î ThisWorkBook.Path ¨ú±o)
³o¼Ë¨C­Ó¤H³£¥Î¬Û¦Pªº¸ô®|§Y¥i,
µ{¦¡¤]·|¤ñ¸û¦nºûÅ@.

TOP

¦^´_ 2# bobomi

·PÁÂbobomi¦^ÂÐ

¤£¹L¦n¹³¨C¥x¹q¸£ªº                    
³o­Ó¦ì¸m -> {AC76BA86-7AD7-1028-7B44-A93000000001}\PDFFile_8.ico" ³£¤£ºÉ¬Û¦P

¥Î³o¤èªk¦n¹³µLªk½T«O¨C¥x¹q¸£³£§ä±o¨ì¹Ï¥Ü
¥Î¥\¨ì¥@¬É¥½¤é¨º¤@¤Ñ¡ã¡ã¡ã

TOP

¦^´_ 3# luhpro

luhpro¤jªº«Øij¬O±N§Ú©Ò­nªº¹Ï¥Ü¡A²Î¤@©ñ¸m¦b¤@³B

Àɮקì¨úªº¹Ï¥Ü³£©T©w§ì¨º¤@³Bªº¹Ï¥Ü¨ÓÅã¥Ü¶Ü???
¥Î¥\¨ì¥@¬É¥½¤é¨º¤@¤Ñ¡ã¡ã¡ã

TOP

¥t¥~½Ð°Ý¦U¦ì¤j¤j

´¡¤JÀɮת«¥ó¡A§Ú¯à§_«ü©w¥L­n´¡¤Jªº¦a¤è©O???

§Ú¥Î¤FRange().select

¥i¥Hªþ¨ì¯S©wÀx¦s®æ¤W

¥i¬O¬°¤°»ò¸Õ¤F´X¦¸¤S¤£¦æ¤F@@

¥t¥~§Ú·Q½Õ¾ã¥¦§e²{¥X¨Óªº¹Ï¥Ü¤j¤p
¥[¤FWidth:=57

¨S¦³®ÄªG

½Ð°Ý¯à«ç»ò¾Þ§@©O???

ÁÂÁÂ
  1.             If Dir(filename) <> "" Then
  2.                 Range("B" & i).Select
  3.                 ActiveSheet.OLEObjects.Add(filename:=filename, Link:=False, Width:=57, DisplayAsIcon:=True, _
  4.                     IconFileName:= _
  5.                     "C:\WINDOWS\Installer\{AC76BA86-7AD7-1028-7B44-A93000000001}\PDFFile_8.ico", _
  6.                     IconIndex:=0, IconLabel:=Range("A" & i)).Select
½Æ»s¥N½X
¥Î¥\¨ì¥@¬É¥½¤é¨º¤@¤Ñ¡ã¡ã¡ã

TOP

¦^´_  luhpro
luhpro¤jªº«Øij¬O±N§Ú©Ò­nªº¹Ï¥Ü¡A²Î¤@©ñ¸m¦b¤@³B
Àɮקì¨úªº¹Ï¥Ü³£©T©w§ì¨º¤@³Bªº¹Ï¥Ü¨ÓÅã¥Ü¶Ü???
li_hsien µoªí©ó 2014-10-23 08:34

³oÀ³¸Ó¬O³Ì¦h¤H¥Îªº¤èªk.

°£«D¬O¨t²Î¦³³W½d(¨Ò¦p¦@¥Î¤¸¥ó¥Ø¿ý, ¦@¥Î®à­±...µ¥¥Ø¿ý)©Î¬O¥«­±±`ºA¤W)¸Ó©ñªº¥Ø¿ý¥~,
¦P¤@®M³nÅé¦Û¤v°µªºÀɮפj³£·|©ñ¦b¦P¤@­Ó¥Ø¿ý¤U.
¤£¦ý¦nºÞ²z¤]«K©ó¤Þ¥Î¬ÛÃö¸ê·½.

¥t¥~½Ð°Ý¦U¦ì¤j¤j
´¡¤JÀɮת«¥ó¡A§Ú¯à§_«ü©w¥L­n´¡¤Jªº¦a¤è©O???
§Ú¥Î¤FRange().select
¥i¥Hªþ¨ì¯S ...
li_hsien µoªí©ó 2014-10-23 15:38

¨ä¹ê Range¥»¨­¤]¦³  .Top .Left ¤Î  .Width .Height  µ¥ÄÝ©Ê,
¥u­n§âª«¥óªº  .Top .Left ³]©w»P¬Y¤@Àx¦s®æ¬Û¦P,
³o­Óª«¥ó´N¹ï»ô¸ÓÀx¦s®æ¥ª¤W¨¤.

­È±o¤@ÃDªº¬O¦³­ÓÄÝ©Ê¥i¥H±N¸Óª«¥ó¸j©w¬Y­ÓÀx¦s®æªº¥ª¤W¨¤,
¨Ï±oª«¥ó¯à¤@ª½¹ï»ôÀx¦s®æ,
¤£¦]´¡¤JÄæ¦C¦Ó¦³©ÒÅÜ°Ê.

TOP

¥»©«³Ì«á¥Ñ GBKEE ©ó 2014-10-27 15:22 ½s¿è

¦^´_ 6# li_hsien
¥t¥~§Ú·Q½Õ¾ã¥¦§e²{¥X¨Óªº¹Ï¥Ü¤j¤p
¥[¤FWidth:=57 ¨S¦³®ÄªG  


VBA OLEObjects.Add ªº½d¨Ò
  1. '®M¥Î¦Ü OLEObjects ª«¥ó®É¡C
  2. '¥»½d¨Ò¦b Sheet1 ¤¤·s¼W¤@­Ó Microsoft Word OLE ª«¥ó¡C

  3. ActiveWorkbook.Worksheets("Sheet1").OLEObjects.Add _
  4.     ClassType:="Word.Document"

  5. '¥»½d¨Ò¬°²Ä¤@±i¤u§@ªí·s¼W«ü¥O«ö¶s¡C
  6. Worksheets(1).OLEObjects.Add ClassType:="Forms.CommandButton.1", _
  7.     Link:=False, DisplayAsIcon:=False, Left:=40, Top:=40, _
  8.     Width:=150, Height:=10
½Æ»s¥N½X
§A¥i¥H«ü©w
  1. Sub Ex()
  2.     Dim i
  3.     i = 5
  4.     With ActiveSheet.OLEObjects.Add(Filename:="D:\test.xls", Link:=False,  DisplayAsIcon:=True, _
  5.         IconFileName:="C:\WINDOWS\Installer\{AC76BA86-7AD7-1028-7B44-A93000000001}\PDFFile_8.ico", _
  6.         IconIndex:=0 , IconLabel:=Range("A" & i))
  7.         .Top = Range("B" & i).Top        '«ü©w³»³¡¦ì¸m
  8.         .Left = Range("B" & i).Left      '«ü©w¥kÃä¦ì¸m
  9.         .Height = Range("B" & i).Height  '«ü©w°ª«×
  10.         .Width = Range("B" & i).Width    '«ü©w¼e«×        
  11.     End With   
  12. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 7# luhpro


·PÁÂluhpro

¹Ï¥Ü©ñ¦b¤@­Ó©T©wªº¸ô®|©Î¸ê®Æ§¨¯uªº¬O­Ó§¹¥þ¤£¿ùªº§@ªk

¤§«e³£¨S·Q¨ì

¤S¦b°õ¦æ¦w±Æ¤W¾Ç¨ì¤F¤@ÂI

ÁÂÁÂ
¥Î¥\¨ì¥@¬É¥½¤é¨º¤@¤Ñ¡ã¡ã¡ã

TOP

¦^´_ 8# GBKEE

·PÁÂGBKEEª©¤j

©Ò¥H¥Lªº¬ÛÃöÄÝ©Ê
.Height
.Width
³£¤£¬O«ü©w¹ê»Úªºªø¼e¡A¦Ó¶È¬O«ü¬Y­ÓÀx¦s®æªº¬Û¹ï¦ì¸m§a???
¥Î¥\¨ì¥@¬É¥½¤é¨º¤@¤Ñ¡ã¡ã¡ã

TOP

        ÀR«ä¦Û¦b : ¦³Ä@©ñ¦b¤ß¸Ì¡A¨S¦³¨­Åé¤O¦æ¡A¥¿¦p¯Ñ¥Ð¤£¼½ºØ¡A¬Ò¬OªÅ¹L¦]½t¡C
ªð¦^¦Cªí ¤W¤@¥DÃD