Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Save as file name and specific field


I have this template where the user runs a macro and at the end it saves
it with the filename "postingSummary.txt" in a Quickbooks import
format.
My file save as PostingSummary.txt is working just fine, but I would
like the add the date of the current week to the file name

I created field in I7 which I maniplutated to hold the wanted file name
of: "F:\_accescc3cData\PostingSum12-18-05.xls", which I could later
convert to a text file.

I am using a posted subroutine:

Sub SaveAsCell()
Dim strName As String

On Error GoTo InvalidName
strName = Sheet1.Range("I7")
ActiveWorkbook.SaveAs strName

but it bombs there.

What is wrong?

It seems to me the the save as cell should do the job, but it bombs
every time.
Any help would be appreciated.
Thanks,

Anne


--
annep
------------------------------------------------------------------------
annep's Profile: http://www.excelforum.com/member.php...o&userid=18851
View this thread: http://www.excelforum.com/showthread...hreadid=499614

  #2   Report Post  
Posted to microsoft.public.excel.programming
JNW JNW is offline
external usenet poster
 
Posts: 480
Default Save as file name and specific field

Try substituting
strName = Sheet1.Range("I7")


with
strName = Sheet1.Range("I7").Text

"annep" wrote:


I have this template where the user runs a macro and at the end it saves
it with the filename "postingSummary.txt" in a Quickbooks import
format.
My file save as PostingSummary.txt is working just fine, but I would
like the add the date of the current week to the file name

I created field in I7 which I maniplutated to hold the wanted file name
of: "F:\_accescc3cData\PostingSum12-18-05.xls", which I could later
convert to a text file.

I am using a posted subroutine:

Sub SaveAsCell()
Dim strName As String

On Error GoTo InvalidName
strName = Sheet1.Range("I7")
ActiveWorkbook.SaveAs strName

but it bombs there.

What is wrong?

It seems to me the the save as cell should do the job, but it bombs
every time.
Any help would be appreciated.
Thanks,

Anne


--
annep
------------------------------------------------------------------------
annep's Profile: http://www.excelforum.com/member.php...o&userid=18851
View this thread: http://www.excelforum.com/showthread...hreadid=499614


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
Macro to Save File to specific location when closing paankadu Excel Discussion (Misc queries) 3 October 26th 09 11:52 PM
Save File at specific Time leerem Excel Discussion (Misc queries) 0 July 15th 09 02:14 PM
How do I save a 689 character fixed field/record format file Mike Excel Discussion (Misc queries) 1 July 23rd 08 12:22 AM
Save file with specific name Dr. Schwartz[_2_] Excel Discussion (Misc queries) 5 January 24th 08 03:48 PM
How to save file to a specific folder? rko281 Excel Discussion (Misc queries) 1 January 25th 05 10:43 PM


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