Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 413
Default Type mismatch

Dimmer than usual this evening.......what am I missing:

Workbooks(wb).SaveAs "C:\BofQProject\QSBofQ _
\Projects\" & SaveDir & "\" & fName & ".xls"

where wb = NewQSBofQ.xls
SaveDir = TEST 910
fName = DUPES

Regards.



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.588 / Virus Database: 372 - Release Date: 13/02/2004


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,624
Default Type mismatch

Try:

Workbooks(wb).SaveAs "C:\BofQProject\QSBofQ" & _
"\Projects\" & SaveDir & "\" & fName & ".xls"

(you can't break a string onto a new line using " _")

In article ,
"Stuart" wrote:

Dimmer than usual this evening.......what am I missing:

Workbooks(wb).SaveAs "C:\BofQProject\QSBofQ _
\Projects\" & SaveDir & "\" & fName & ".xls"

where wb = NewQSBofQ.xls
SaveDir = TEST 910
fName = DUPES

  #3   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Type mismatch

Thanks, but I broke the line simply for the purposes of
the post. In the module, it occupies one line.

Regards.

-----Original Message-----
Try:

Workbooks(wb).SaveAs "C:\BofQProject\QSBofQ" & _
"\Projects\" & SaveDir & "\" & fName & ".xls"

(you can't break a string onto a new line using " _")

In article ,
"Stuart" wrote:

Dimmer than usual this evening.......what am I missing:

Workbooks(wb).SaveAs "C:\BofQProject\QSBofQ _
\Projects\" & SaveDir & "\" & fName & ".xls"

where wb = NewQSBofQ.xls
SaveDir = TEST 910
fName = DUPES

.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,624
Default Type mismatch

Are wb, SaveDir and fName all string variables?

If wb is a workbook object variable it will give a Type mismatch. In
that case, the call should be

wb.SaveAs ...

Otherwise, I can't tell from the info you've presented.

In article ,
wrote:

Thanks, but I broke the line simply for the purposes of
the post. In the module, it occupies one line.

  #5   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Type mismatch

Many thanks.....you got it.

wb.SaveAs, since wb was an object variable.

Regards and thanks.

-----Original Message-----
Are wb, SaveDir and fName all string variables?

If wb is a workbook object variable it will give a Type

mismatch. In
that case, the call should be

wb.SaveAs ...

Otherwise, I can't tell from the info you've presented.

In article ,
wrote:

Thanks, but I broke the line simply for the purposes of
the post. In the module, it occupies one line.

.

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
Type Mismatch [email protected] Excel Worksheet Functions 1 May 16th 07 03:29 PM
type mismatch--how to fix rroach Excel Discussion (Misc queries) 2 July 14th 05 06:23 PM
Type mismatch Steve Garman Excel Programming 0 February 5th 04 07:39 AM
Type mismatch Alan Beban[_4_] Excel Programming 0 February 4th 04 08:39 PM
Type Mismatch Phil Hageman[_3_] Excel Programming 2 January 9th 04 06:11 PM


All times are GMT +1. The time now is 09:44 AM.

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"