Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 34
Default Variable in a VB Code

I have a simple question.

I have a Cell named "DirLoc" and in that cell the value: "c:\fileinfo"

How can I put that in a vb string?

Example: FileLoc = Cell(RangeName) & "\testing.xls"

So: FileLoc = "c:\fileinfo\testing.xls"

Thank you in advance for any help.

Mike


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Variable in a VB Code

Mike,

Use something like

FileLoc = Range("DirLoc").Text & "\testing.xls"


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"Michael Kintner" wrote in message
...
I have a simple question.

I have a Cell named "DirLoc" and in that cell the value:

"c:\fileinfo"

How can I put that in a vb string?

Example: FileLoc = Cell(RangeName) & "\testing.xls"

So: FileLoc = "c:\fileinfo\testing.xls"

Thank you in advance for any help.

Mike




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
Code for variable sort order Jacob Skaria Excel Discussion (Misc queries) 1 April 28th 10 02:26 PM
keep variable value after code quits Steve Excel Discussion (Misc queries) 4 July 7th 09 06:06 PM
can i link a variable cost code with a variable sum I need help!! Excel Discussion (Misc queries) 0 August 1st 08 11:40 AM
VBA Code - NAME SEVERAL VARIABLE cells Danny Excel Worksheet Functions 0 October 14th 05 06:15 PM
variable code?? Paul Excel Discussion (Misc queries) 1 April 5th 05 06:37 PM


All times are GMT +1. The time now is 02:19 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"