ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Saving TIF file question (https://www.excelbanter.com/excel-programming/309493-saving-tif-file-question.html)

JT[_2_]

Saving TIF file question
 
In my macro, I open a TIF file and store the file name /
location in a variable.

At the end of the macro, I want to save the file in the
variable with a different name but I'm having trouble with
the syntax.

I've tried using the macro recorder for save as but that
helps me save the Excel workbook instead of the TIF file.

Any help with the syntax would be appreciated.

Tom Ogilvy

Saving TIF file question
 
You can't really save a TIF file from excel. What you can do is make a copy
of the Tif File

see help on the filecopy command. Note that the file can't be open. If you
have imported the file into excel, then I don't believe it will be open, but
haven't tested it myself.

--
Regards,
Tom Ogilvy

"JT" wrote in message
...
In my macro, I open a TIF file and store the file name /
location in a variable.

At the end of the macro, I want to save the file in the
variable with a different name but I'm having trouble with
the syntax.

I've tried using the macro recorder for save as but that
helps me save the Excel workbook instead of the TIF file.

Any help with the syntax would be appreciated.




Dave Peterson[_3_]

Saving TIF file question
 
If you know the name of the TIF file, couldn't you just do a FileCopy to copy it
from its original location to another location.

VBA's help has a nice example if that fits.



JT wrote:

In my macro, I open a TIF file and store the file name /
location in a variable.

At the end of the macro, I want to save the file in the
variable with a different name but I'm having trouble with
the syntax.

I've tried using the macro recorder for save as but that
helps me save the Excel workbook instead of the TIF file.

Any help with the syntax would be appreciated.


--

Dave Peterson



All times are GMT +1. The time now is 05:21 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com