A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

upgrade macros to 07



 
 
Thread Tools Display Modes
  #1  
Old April 19th, 2010, 01:19 PM posted to microsoft.public.excel.misc
tigo
external usenet poster
 
Posts: 6
Default upgrade macros to 07

I had macros running in Excel 97 and now was upgraded to 07. The macro won't
run, error says there aren't enough rows in destination file. I"m a novice
macro user and this was written by someone a year ago who has since retired.
It gets a text file, dumps it to Excel and formats it (takes out repetitive
garbage headers that reoccur throughout). What do I need to do to transition
my existing excel files with macros to 07?
TY in advance

  #2  
Old April 19th, 2010, 01:57 PM posted to microsoft.public.excel.misc
Niek Otten
external usenet poster
 
Posts: 2,533
Default upgrade macros to 07

Post the code of your macro and the exact error message

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"tigo" wrote in message
...
I had macros running in Excel 97 and now was upgraded to 07. The macro
won't
run, error says there aren't enough rows in destination file. I"m a
novice
macro user and this was written by someone a year ago who has since
retired.
It gets a text file, dumps it to Excel and formats it (takes out
repetitive
garbage headers that reoccur throughout). What do I need to do to
transition
my existing excel files with macros to 07?
TY in advance


  #3  
Old April 20th, 2010, 01:38 PM posted to microsoft.public.excel.misc
tigo
external usenet poster
 
Posts: 6
Default upgrade macros to 07

'Run Time error 1004':

Excel cannot insert the sheets into the destination workbook, because it
contains fewer rows and columns than the source workbook. To move or copy
the data to the destination workbook, you can select the data, and then us
the Copy and Paste commands to instert it into the sheets of another workbook.

"Niek Otten" wrote:

Post the code of your macro and the exact error message

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"tigo" wrote in message
...
I had macros running in Excel 97 and now was upgraded to 07. The macro
won't
run, error says there aren't enough rows in destination file. I"m a
novice
macro user and this was written by someone a year ago who has since
retired.
It gets a text file, dumps it to Excel and formats it (takes out
repetitive
garbage headers that reoccur throughout). What do I need to do to
transition
my existing excel files with macros to 07?
TY in advance


  #4  
Old April 20th, 2010, 01:44 PM posted to microsoft.public.excel.misc
tigo
external usenet poster
 
Posts: 6
Default upgrade macros to 07


myFile = Application.GetOpenFilename("Text Files,*.txt")
Workbooks.OpenText Filename:=myFile, _
Origin:=437, _
StartRow:=3, _
DataType:=xlFixedWidth, _
FieldInfo:=Array( _
Array(0, 1), Array(8, 1), Array(14, 1), Array(25, 1), Array(29, 1),
Array(39, 1), Array(42, _
1), Array(75, 1), Array(98, 1), Array(106, 1), Array(110, 1),
Array(114, 1), Array(137, 1), _
Array(148, 1), Array(165, 1), Array(180, 1), Array(190, 1)),
TrailingMinusNumbers:= _
True
ActiveWindow.WindowState = xlNormal
ActiveWindow.SmallScroll Down:=-6
ActiveSheet.Move Befo=Workbooks("del022410.xls").Sheets(1)
Rows("2:2").Select
Selection.Delete Shift:=xlUp
Range("A1").Select
ActiveCell.FormulaR1C1 = "DateShip"
Range("B1").Select
ActiveCell.FormulaR1C1 = "Days Late"
Range("C1").Select
ActiveCell.FormulaR1C1 = "Late Order"
Range("D1").Select
ActiveCell.FormulaR1C1 = "Itm Rel"
Columns("E:E").Select
Selection.Delete Shift:=xlToLeft
Range("L1").Select
ActiveCell.FormulaR1C1 = "Quantity"
Range("M1").Select
ActiveCell.FormulaR1C1 = "Dollars"
Range("N1").Select
ActiveCell.FormulaR1C1 = "OnHand"
Range("O1").Select
ActiveCell.FormulaR1C1 = "Alloc"
Range("A1").Select

"Niek Otten" wrote:

Post the code of your macro and the exact error message

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"tigo" wrote in message
...
I had macros running in Excel 97 and now was upgraded to 07. The macro
won't
run, error says there aren't enough rows in destination file. I"m a
novice
macro user and this was written by someone a year ago who has since
retired.
It gets a text file, dumps it to Excel and formats it (takes out
repetitive
garbage headers that reoccur throughout). What do I need to do to
transition
my existing excel files with macros to 07?
TY in advance


  #5  
Old April 20th, 2010, 03:33 PM posted to microsoft.public.excel.misc
Niek Otten
external usenet poster
 
Posts: 2,533
Default upgrade macros to 07

It seems you are using an Excel 2003 format file with 64k rows and an .xls
file type extension.
Save the destination file as an Excel 2007 file (with a million rows, it
will get a .xlsx extension) and I expect your problem will be gone.

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"tigo" wrote in message
...

myFile = Application.GetOpenFilename("Text Files,*.txt")
Workbooks.OpenText Filename:=myFile, _
Origin:=437, _
StartRow:=3, _
DataType:=xlFixedWidth, _
FieldInfo:=Array( _
Array(0, 1), Array(8, 1), Array(14, 1), Array(25, 1), Array(29, 1),
Array(39, 1), Array(42, _
1), Array(75, 1), Array(98, 1), Array(106, 1), Array(110, 1),
Array(114, 1), Array(137, 1), _
Array(148, 1), Array(165, 1), Array(180, 1), Array(190, 1)),
TrailingMinusNumbers:= _
True
ActiveWindow.WindowState = xlNormal
ActiveWindow.SmallScroll Down:=-6
ActiveSheet.Move Befo=Workbooks("del022410.xls").Sheets(1)
Rows("2:2").Select
Selection.Delete Shift:=xlUp
Range("A1").Select
ActiveCell.FormulaR1C1 = "DateShip"
Range("B1").Select
ActiveCell.FormulaR1C1 = "Days Late"
Range("C1").Select
ActiveCell.FormulaR1C1 = "Late Order"
Range("D1").Select
ActiveCell.FormulaR1C1 = "Itm Rel"
Columns("E:E").Select
Selection.Delete Shift:=xlToLeft
Range("L1").Select
ActiveCell.FormulaR1C1 = "Quantity"
Range("M1").Select
ActiveCell.FormulaR1C1 = "Dollars"
Range("N1").Select
ActiveCell.FormulaR1C1 = "OnHand"
Range("O1").Select
ActiveCell.FormulaR1C1 = "Alloc"
Range("A1").Select

"Niek Otten" wrote:

Post the code of your macro and the exact error message

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"tigo" wrote in message
...
I had macros running in Excel 97 and now was upgraded to 07. The macro
won't
run, error says there aren't enough rows in destination file. I"m a
novice
macro user and this was written by someone a year ago who has since
retired.
It gets a text file, dumps it to Excel and formats it (takes out
repetitive
garbage headers that reoccur throughout). What do I need to do to
transition
my existing excel files with macros to 07?
TY in advance



  #6  
Old April 22nd, 2010, 01:54 PM posted to microsoft.public.excel.misc
tigo
external usenet poster
 
Posts: 6
Default upgrade macros to 07

Thank you. Unfortunately, I"m getting the same error.

"Niek Otten" wrote:

It seems you are using an Excel 2003 format file with 64k rows and an .xls
file type extension.
Save the destination file as an Excel 2007 file (with a million rows, it
will get a .xlsx extension) and I expect your problem will be gone.

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"tigo" wrote in message
...

myFile = Application.GetOpenFilename("Text Files,*.txt")
Workbooks.OpenText Filename:=myFile, _
Origin:=437, _
StartRow:=3, _
DataType:=xlFixedWidth, _
FieldInfo:=Array( _
Array(0, 1), Array(8, 1), Array(14, 1), Array(25, 1), Array(29, 1),
Array(39, 1), Array(42, _
1), Array(75, 1), Array(98, 1), Array(106, 1), Array(110, 1),
Array(114, 1), Array(137, 1), _
Array(148, 1), Array(165, 1), Array(180, 1), Array(190, 1)),
TrailingMinusNumbers:= _
True
ActiveWindow.WindowState = xlNormal
ActiveWindow.SmallScroll Down:=-6
ActiveSheet.Move Befo=Workbooks("del022410.xls").Sheets(1)
Rows("2:2").Select
Selection.Delete Shift:=xlUp
Range("A1").Select
ActiveCell.FormulaR1C1 = "DateShip"
Range("B1").Select
ActiveCell.FormulaR1C1 = "Days Late"
Range("C1").Select
ActiveCell.FormulaR1C1 = "Late Order"
Range("D1").Select
ActiveCell.FormulaR1C1 = "Itm Rel"
Columns("E:E").Select
Selection.Delete Shift:=xlToLeft
Range("L1").Select
ActiveCell.FormulaR1C1 = "Quantity"
Range("M1").Select
ActiveCell.FormulaR1C1 = "Dollars"
Range("N1").Select
ActiveCell.FormulaR1C1 = "OnHand"
Range("O1").Select
ActiveCell.FormulaR1C1 = "Alloc"
Range("A1").Select

"Niek Otten" wrote:

Post the code of your macro and the exact error message

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"tigo" wrote in message
...
I had macros running in Excel 97 and now was upgraded to 07. The macro
won't
run, error says there aren't enough rows in destination file. I"m a
novice
macro user and this was written by someone a year ago who has since
retired.
It gets a text file, dumps it to Excel and formats it (takes out
repetitive
garbage headers that reoccur throughout). What do I need to do to
transition
my existing excel files with macros to 07?
TY in advance



  #7  
Old April 22nd, 2010, 02:20 PM posted to microsoft.public.excel.misc
tigo
external usenet poster
 
Posts: 6
Default upgrade macros to 07

tried it again (had to change the file name in vbs) but now I get this error:
Run-time error '9':

Subscript out of range

Can you help?

"tigo" wrote:

Thank you. Unfortunately, I"m getting the same error.

"Niek Otten" wrote:

It seems you are using an Excel 2003 format file with 64k rows and an .xls
file type extension.
Save the destination file as an Excel 2007 file (with a million rows, it
will get a .xlsx extension) and I expect your problem will be gone.

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"tigo" wrote in message
...

myFile = Application.GetOpenFilename("Text Files,*.txt")
Workbooks.OpenText Filename:=myFile, _
Origin:=437, _
StartRow:=3, _
DataType:=xlFixedWidth, _
FieldInfo:=Array( _
Array(0, 1), Array(8, 1), Array(14, 1), Array(25, 1), Array(29, 1),
Array(39, 1), Array(42, _
1), Array(75, 1), Array(98, 1), Array(106, 1), Array(110, 1),
Array(114, 1), Array(137, 1), _
Array(148, 1), Array(165, 1), Array(180, 1), Array(190, 1)),
TrailingMinusNumbers:= _
True
ActiveWindow.WindowState = xlNormal
ActiveWindow.SmallScroll Down:=-6
ActiveSheet.Move Befo=Workbooks("del022410.xls").Sheets(1)
Rows("2:2").Select
Selection.Delete Shift:=xlUp
Range("A1").Select
ActiveCell.FormulaR1C1 = "DateShip"
Range("B1").Select
ActiveCell.FormulaR1C1 = "Days Late"
Range("C1").Select
ActiveCell.FormulaR1C1 = "Late Order"
Range("D1").Select
ActiveCell.FormulaR1C1 = "Itm Rel"
Columns("E:E").Select
Selection.Delete Shift:=xlToLeft
Range("L1").Select
ActiveCell.FormulaR1C1 = "Quantity"
Range("M1").Select
ActiveCell.FormulaR1C1 = "Dollars"
Range("N1").Select
ActiveCell.FormulaR1C1 = "OnHand"
Range("O1").Select
ActiveCell.FormulaR1C1 = "Alloc"
Range("A1").Select

"Niek Otten" wrote:

Post the code of your macro and the exact error message

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"tigo" wrote in message
...
I had macros running in Excel 97 and now was upgraded to 07. The macro
won't
run, error says there aren't enough rows in destination file. I"m a
novice
macro user and this was written by someone a year ago who has since
retired.
It gets a text file, dumps it to Excel and formats it (takes out
repetitive
garbage headers that reoccur throughout). What do I need to do to
transition
my existing excel files with macros to 07?
TY in advance



  #8  
Old April 22nd, 2010, 02:24 PM posted to microsoft.public.excel.misc
tigo
external usenet poster
 
Posts: 6
Default upgrade macros to 07

ActiveSheet.Move Befo=Workbooks("del022410.xlsx").Sheets(1)

"tigo" wrote:

tried it again (had to change the file name in vbs) but now I get this error:
Run-time error '9':

Subscript out of range

Can you help?

"tigo" wrote:

Thank you. Unfortunately, I"m getting the same error.

"Niek Otten" wrote:

It seems you are using an Excel 2003 format file with 64k rows and an .xls
file type extension.
Save the destination file as an Excel 2007 file (with a million rows, it
will get a .xlsx extension) and I expect your problem will be gone.

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"tigo" wrote in message
...

myFile = Application.GetOpenFilename("Text Files,*.txt")
Workbooks.OpenText Filename:=myFile, _
Origin:=437, _
StartRow:=3, _
DataType:=xlFixedWidth, _
FieldInfo:=Array( _
Array(0, 1), Array(8, 1), Array(14, 1), Array(25, 1), Array(29, 1),
Array(39, 1), Array(42, _
1), Array(75, 1), Array(98, 1), Array(106, 1), Array(110, 1),
Array(114, 1), Array(137, 1), _
Array(148, 1), Array(165, 1), Array(180, 1), Array(190, 1)),
TrailingMinusNumbers:= _
True
ActiveWindow.WindowState = xlNormal
ActiveWindow.SmallScroll Down:=-6
ActiveSheet.Move Befo=Workbooks("del022410.xls").Sheets(1)
Rows("2:2").Select
Selection.Delete Shift:=xlUp
Range("A1").Select
ActiveCell.FormulaR1C1 = "DateShip"
Range("B1").Select
ActiveCell.FormulaR1C1 = "Days Late"
Range("C1").Select
ActiveCell.FormulaR1C1 = "Late Order"
Range("D1").Select
ActiveCell.FormulaR1C1 = "Itm Rel"
Columns("E:E").Select
Selection.Delete Shift:=xlToLeft
Range("L1").Select
ActiveCell.FormulaR1C1 = "Quantity"
Range("M1").Select
ActiveCell.FormulaR1C1 = "Dollars"
Range("N1").Select
ActiveCell.FormulaR1C1 = "OnHand"
Range("O1").Select
ActiveCell.FormulaR1C1 = "Alloc"
Range("A1").Select

"Niek Otten" wrote:

Post the code of your macro and the exact error message

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"tigo" wrote in message
...
I had macros running in Excel 97 and now was upgraded to 07. The macro
won't
run, error says there aren't enough rows in destination file. I"m a
novice
macro user and this was written by someone a year ago who has since
retired.
It gets a text file, dumps it to Excel and formats it (takes out
repetitive
garbage headers that reoccur throughout). What do I need to do to
transition
my existing excel files with macros to 07?
TY in advance



 




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 04:43 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.