PC Review


Reply
Thread Tools Rate Thread

Converting xlsx to xl

 
 
Patel
Guest
Posts: n/a
 
      22nd Sep 2008
Good morning,

I'm hoping someone has already ran into this problem, and I'm sure it
will continue until more businesses switch over to 2007 excel xlsx.
Here's what I'm trying to do: I have a file that that I'm taking some
information from, copying it, starting a new workbook, pasting the
information, and then generating an e-mail. The problem is that even
if my original workbook was saved as a 97-2003 excel workbook, now
that I have 2007 installed, any new workbook automatically becomes an
xlsx. I would like to make this code still work but without having the
user have to do a "save as", change the file type, etc.

Any help would be appreciated.

Sheets("Log").Select
Range("A1").Select
ActiveSheet.UsedRange.Copy
Workbooks.Add
Selection.PasteSpecial Paste:=xlPasteColumnWidths,
Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
ActiveSheet.Paste
Range("A1").Select
Application.Dialogs(xlDialogSendMail).Show



Thank you,
Stephen
 
Reply With Quote
 
 
 
 
sbitaxi@gmail.com
Guest
Posts: n/a
 
      22nd Sep 2008
Hello,

Visit this link, it may help for setting the default save format.

http://www.howtogeek.com/howto/micro...l-2003-format/


Regards,

Steven

On Sep 22, 11:56*am, Patel <sspa...@iowatelecom.net> wrote:
> Good morning,
>
> I'm hoping someone has already ran into this problem, and I'm sure it
> will continue until more businesses switch over to 2007 excel xlsx.
> Here's what I'm trying to do: I have a file that that I'm taking some
> information from, copying it, starting a new workbook, pasting the
> information, and then generating an e-mail. The problem is that even
> if my original workbook was saved as a 97-2003 excel workbook, now
> that I have 2007 installed, any new workbook automatically becomes an
> xlsx. I would like to make this code still work but without having the
> user have to do a "save as", change the file type, etc.
>
> Any help would be appreciated.
>
> * * Sheets("Log").Select
> * * Range("A1").Select
> * * ActiveSheet.UsedRange.Copy
> * * Workbooks.Add
> * * Selection.PasteSpecial Paste:=xlPasteColumnWidths,
> Operation:=xlNone, _
> * * * * * * * * * * * * * *SkipBlanks:=False, Transpose:=False
> * * ActiveSheet.Paste
> * * Range("A1").Select
> * * Application.Dialogs(xlDialogSendMail).Show
>
> Thank you,
> Stephen


 
Reply With Quote
 
Orion Cochrane
Guest
Posts: n/a
 
      22nd Sep 2008
Hi.
You can change the options by clicking on the Office Logo button (top-left
corner of screen). Go to Excel Options (located on the bottom-right corner of
the menu before Exit Excel). Click the Save option and select the Excel
97-2003 Workbook (*.xls) option in the Save As Type drop-down.
--
Please rate posts so we know when we have answered your questions. Thanks.


"Patel" wrote:

> Good morning,
>
> I'm hoping someone has already ran into this problem, and I'm sure it
> will continue until more businesses switch over to 2007 excel xlsx.
> Here's what I'm trying to do: I have a file that that I'm taking some
> information from, copying it, starting a new workbook, pasting the
> information, and then generating an e-mail. The problem is that even
> if my original workbook was saved as a 97-2003 excel workbook, now
> that I have 2007 installed, any new workbook automatically becomes an
> xlsx. I would like to make this code still work but without having the
> user have to do a "save as", change the file type, etc.
>
> Any help would be appreciated.
>
> Sheets("Log").Select
> Range("A1").Select
> ActiveSheet.UsedRange.Copy
> Workbooks.Add
> Selection.PasteSpecial Paste:=xlPasteColumnWidths,
> Operation:=xlNone, _
> SkipBlanks:=False, Transpose:=False
> ActiveSheet.Paste
> Range("A1").Select
> Application.Dialogs(xlDialogSendMail).Show
>
>
>
> Thank you,
> Stephen
>

 
Reply With Quote
 
Patel
Guest
Posts: n/a
 
      22nd Sep 2008
Thanks for the posts. That is a helpful thing to know, but I'm still
wondering if I can do it through visual basic instead of changing the
settings. I am creating this for others to use, so if that's the only
way to change it, then I will have to have all of them change their
excel options. Is there any way to do this through code for just this
macro?

Thanks again,
Stephen
 
Reply With Quote
 
sbitaxi@gmail.com
Guest
Posts: n/a
 
      25th Sep 2008
On Sep 22, 3:45*pm, Patel <sspa...@iowatelecom.net> wrote:
> Thanks for the posts. That is a helpful thing to know, but I'm still
> wondering if I can do it through visual basic instead of changing the
> settings. I am creating this for others to use, so if that's the only
> way to change it, then I will have to have all of them change their
> excel options. Is there any way to do this through code for just this
> macro?
>
> Thanks again,
> Stephen


Hi Stephen,

You can try toying with this snippet I got a while back from Ron De
Bruin

'Determine the Excel version and file extension/format
If Val(Application.VERSION) < 12 Then
'You use Excel 97-2003
FileExtStr = ".xls": FileFormatNum = -4143
Else
'You use Excel 2007
If SrcBk.Parent.FileFormat = 56 Then
FileExtStr = ".xls": FileFormatNum = 56
Else
FileExtStr = ".xlsx": FileFormatNum = 51
End If
End If


File format is the ID number of the extension string.


S
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Converting .xls to .xlsx via DOS command Lee Microsoft Excel Discussion 0 20th Jul 2011 10:31 AM
converting to xlsx error jon Microsoft Excel New Users 0 13th Oct 2009 07:42 PM
Problems converting from xlsx to xls Italian Cousin Microsoft Excel Misc 0 7th Aug 2009 05:46 PM
Converting Files to xlsx Jeff Microsoft Excel Misc 0 29th Dec 2008 08:49 PM
Converting from .xlsx to .xls =?Utf-8?B?aW5ndWxpdGE=?= Microsoft Excel Misc 2 11th Jul 2007 03:26 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:49 AM.