![]() |
file name from a cell value in VB
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: http://www.excelforum.com/member.php...o&userid=28438 View this thread: http://www.excelforum.com/showthread...hreadid=516263 |
file name from a cell value in VB
try Dim myFileName as String myFileName = "c/documents.pictures." & range("A1").Value & ".jpg" Hope that helps -- kraljb ------------------------------------------------------------------------ kraljb's Profile: http://www.excelforum.com/member.php...fo&userid=9955 View this thread: http://www.excelforum.com/showthread...hreadid=516263 |
file name from a cell value in VB
"C:\Directory\Pictures\" & Range("A1").value
hth Vaya con Dios, Chuck, CABGx3 "spydor" wrote: 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: http://www.excelforum.com/member.php...o&userid=28438 View this thread: http://www.excelforum.com/showthread...hreadid=516263 |
All times are GMT +1. The time now is 08:08 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com