G
Gillian
I have recently set up three Excel spreadsheets for formatting data imported
from a text file generated in a DOS program. Once the data is pasted into
the master spreadsheet it is renamed with a date and a set of two or three
macros that manipulate the data, inserting/hiding columns, adding up,
subtotals, formatting, etc.
The files are held on a shared drive on our network.
On my computer (using Excel 2000 on WinXP) each of the four files and their
macros work perfectly. On my colleague's computer (using the same version of
Excel and XP) only two of the macros will work. On the other two we get a
Debug message. When we look at the macro using F8 to step through we can see
that the only functions to work are those where text is typed in. For
example, the first few rows of the first macro are this:
Range("A1").Select
Selection.EntireRow.Insert
ActiveCell.FormulaR1C1 = "Supplier"
Range("B1").Select
ActiveCell.FormulaR1C1 = "SageRef"
Range("C1").Select
ActiveCell.FormulaR1C1 = "Item"
Range("D1").Select
What happens, though, is:
No row is inserted
All the above text is written into A1 instead of moving to B1, C1, D1,
and so on.
So of course the macro soon fails altogether.
I am completely stumped!
Any suggestions very gratefully received.
from a text file generated in a DOS program. Once the data is pasted into
the master spreadsheet it is renamed with a date and a set of two or three
macros that manipulate the data, inserting/hiding columns, adding up,
subtotals, formatting, etc.
The files are held on a shared drive on our network.
On my computer (using Excel 2000 on WinXP) each of the four files and their
macros work perfectly. On my colleague's computer (using the same version of
Excel and XP) only two of the macros will work. On the other two we get a
Debug message. When we look at the macro using F8 to step through we can see
that the only functions to work are those where text is typed in. For
example, the first few rows of the first macro are this:
Range("A1").Select
Selection.EntireRow.Insert
ActiveCell.FormulaR1C1 = "Supplier"
Range("B1").Select
ActiveCell.FormulaR1C1 = "SageRef"
Range("C1").Select
ActiveCell.FormulaR1C1 = "Item"
Range("D1").Select
What happens, though, is:
No row is inserted
All the above text is written into A1 instead of moving to B1, C1, D1,
and so on.
So of course the macro soon fails altogether.
I am completely stumped!
Any suggestions very gratefully received.