LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
JJ JJ is offline
external usenet poster
 
Posts: 122
Default Saving Workbook with Variable

I have been trying to figure out how to save or open a workbook using a
variable. I keep getting the error "Type-declaration character doesn't match
declared data type". Here is an example of what i am trying to do:

Dim y as string
y = Range("A1")
ChDir "G:the current directory\" & z&
Workbooks.OpenText Filename:= _
"G:the current directory\" & z & "\" & y&
 
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
Saving as variable file name leerem Excel Discussion (Misc queries) 1 September 29th 08 10:30 AM
Saving a Workbook: Forcing User to Rename before Saving Rollin_Again[_6_] Excel Programming 5 April 16th 04 02:54 PM
Saving Range Locatoin into a Variable Jake Marx Excel Programming 4 September 10th 03 10:08 PM
Saving Range Locatoin into a Variable Bob Phillips[_5_] Excel Programming 0 September 10th 03 09:13 PM
Saving Registry variable to ini file Allen[_3_] Excel Programming 0 September 10th 03 06:14 PM


All times are GMT +1. The time now is 08:41 AM.

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

About Us

"It's about Microsoft Excel"