Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I posted this in General, but I think it is more of a Programming issue.
As the subject says, I have a working macro (auto_open) that works fine when i am testing. It simply opens a CSV file and copies cells to the different sheets in the spreadsheet. However, if someone who is not 'Administrator' runs it it stops on the first "sheets" command and give an error "subscript out of range". I tested for a long time before I figured out the problem, but I have set Excel security levels at the lowest and changed the security on the workbook and CSV files to allow "everyone" but it still won't work. What is the problem? More important, what is the fix? Tthe CSV file is opened correctly. In fact when the debug error message is cancelled, I can see both files in Excel by changing windows. The CSV file shows the data correctly and the first row is selected waiting to be copied and pasted into the XLS. The error line shown in the debugger is "Sheets (Broadspire.xls) .select" with error 9 'Subscript out of Range'. Here is the beginning of the macro : Sub auto_open() ' ' auto_open Macro ' Macro recorded 5/5/2006 by Tod Brannen ' ' Keyboard Shortcut: Ctrl+o ' Workbooks.Open Filename:="h:\sme\data\Broadspire.csv" <<< Opens Fine. Range("A3:H3").Select <<<Selects Fine. Selection.Copy Windows("Broadspire.xls").Activate Sheets("Quarterly BCO Detail").Select <<<<<Error line Range("B16").Select Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=False Thanks for looking, Tod Brannen |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I tell Excel that I am the administrator? | Excel Discussion (Misc queries) | |||
Administrator | New Users to Excel | |||
Administrator rights | Excel Discussion (Misc queries) | |||
Excel macro works only for administrator | Excel Discussion (Misc queries) | |||
Is the user Administrator | Excel Programming |