LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default still stuck: get filename from range


I'm new at this. With much help from this forum I've almost finished
major timesaving macro for our lab. But stuck on following problem.
load a list of files that are in a worksheet and do a for-next loop o
them,. Before closing each file I want to save it as an XLS file AND a
a text file. I don't understand VBA syntax well enough to know how t
get the filename for the filesave command.

My code now:
Sub File_Cut_Metrics()

Dim wbList As Workbook
Dim wbDest As Workbook
Dim rcell As Range

Set wbList = Workbooks.Open("G:\newlist2")
For Each rcell I
wbList.Sheets(1).Range("A1").CurrentRegion.Columns (1).Cells
Set wbDest = Workbooks.Open(rcell.Value)

NB: IF I PUT IN \"MSGBOX RCELL\" HERE IT SHOWS THE CORRECT FILENAM

do some stuff

wbDest.Save

WBDEST.SAVEAS FILENAME:=RCELL, FILEFORMAT:=XLTEXT, CREATEBACKUP:=FALSE
NOTE: SUB'ING RCELL.VALUE FOR RCELL ABOVE DOESN'T WORK EITHE

wbDest.Close savechanges:=False
Next

End Sub

What do I need to change to send the right filename to the SaveA
statement?

TIA,

Ro

--
rroac
-----------------------------------------------------------------------
rroach's Profile: http://www.excelforum.com/member.php...fo&userid=2109
View this thread: http://www.excelforum.com/showthread.php?threadid=38722

 
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
Limit search range then loop thru' each cell...a bit stuck... ste mac Excel Programming 1 December 17th 04 01:35 PM
Newbie stuck on Passing a Variable into a Range Dana DeLouis[_5_] Excel Programming 1 August 13th 03 11:43 PM
Newbie stuck on Passing a Variable into a Range Dave Baranas Excel Programming 0 August 13th 03 07:54 AM
Newbie stuck on Passing a Variable into a Range Bob Kilmer Excel Programming 0 August 13th 03 02:38 AM
Newbie stuck on Passing a Variable into a Range Bob Kilmer Excel Programming 0 August 13th 03 02:20 AM


All times are GMT +1. The time now is 07:01 PM.

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"