Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
spydor
 
Posts: n/a
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.misc
kraljb
 
Posts: n/a
Default 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

  #3   Report Post  
Posted to microsoft.public.excel.misc
CLR
 
Posts: n/a
Default 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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Q: Can a formula reference a cell to get the file name to link to for data? mgarcia Excel Discussion (Misc queries) 3 January 18th 06 02:56 PM
File name equal cell contents cxlough41 Excel Discussion (Misc queries) 0 January 3rd 06 10:47 PM
Concatenating cells to produce a cell ref from another excel file ItsMeAgain Excel Worksheet Functions 1 June 24th 05 02:06 PM
how do i reference data in a file with the fname in another cell? jhlrtn Excel Worksheet Functions 1 May 23rd 05 11:11 PM
GET.CELL Biff Excel Worksheet Functions 2 November 24th 04 07:16 PM


All times are GMT +1. The time now is 06:12 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"