I am writing in VB using macro to associate a graphic with a part number
located in a specific cell.
I need to return a graphic using the value of a cell.
IE: if the cell value is: CG234
Then Ineed to tell the macro to go to file:
C/documents.pictures.CG234.jpg
I can do the macro for locating the picture but can't figure out how to
get the cell value to become part of the file address where the graphic
is located.
Got any ideas on this???
Thanks for your consideration.........
Spydor--
spydor
------------------------------------------------------------------------
spydor's Profile: www.excelforum.com/member.php...oamp;userid=28438
View this thread: www.excelforum.com/showthread...hreadid=516263
try
Dim myFileName as String
myFileName = quot;c/documents.pictures.quot; amp; range(quot;A1quot;).Value amp; quot;.jpgquot;
Hope that helps--
kraljb
------------------------------------------------------------------------
kraljb's Profile: www.excelforum.com/member.php...foamp;userid=9955
View this thread: www.excelforum.com/showthread...hreadid=516263quot;C:\Directory\Pictures\quot; amp; Range(quot;A1quot;).value
hth
Vaya con Dios,
Chuck, CABGx3quot;spydorquot; wrote:
gt;
gt; I am writing in VB using macro to associate a graphic with a part number
gt; located in a specific cell.
gt;
gt; I need to return a graphic using the value of a cell.
gt;
gt; IE: if the cell value is: CG234
gt; Then Ineed to tell the macro to go to file:
gt; C/documents.pictures.CG234.jpg
gt;
gt; I can do the macro for locating the picture but can't figure out how to
gt; get the cell value to become part of the file address where the graphic
gt; is located.
gt;
gt; Got any ideas on this???
gt;
gt; Thanks for your consideration.........
gt;
gt; Spydor
gt;
gt;
gt; --
gt; spydor
gt; ------------------------------------------------------------------------
gt; spydor's Profile: www.excelforum.com/member.php...oamp;userid=28438
gt; View this thread: www.excelforum.com/showthread...hreadid=516263
gt;
gt;
- Oct 18 Sat 2008 20:46
file name from a cell value in VB
close
全站熱搜
留言列表
發表留言