Jouve
New Member
- Joined
- Aug 10, 2006
- Messages
- 19
Hello,
i have a macro that does something like this:
Now, i have 2 macros that implement the same code described above.
one is a Command1_click in Sheet A
the other is shortcut macro : Ctrl + r in "Modules"
If i'm pressing Ctrl + r, it works perfectly.
if i click the button in sheet A,
something like this comes out :
Laufzeitfehler "1004":
Die Methode 'Range' für das Objekt '_Worksheet' ist fehlgeschlagen
Translated to : Error 1004
The method 'Range' for the object '_Worksheet' failed.
and sometimes : The 'Select' method from the Range Object can't be executed
what's wrong here?
is there anyway to make the Button work ?
I'd appreciate any help, thanks.
i have a macro that does something like this:
Code:
Sheets("A").Select
Range("A1").Select
ActiveCell.FormulaR1C1 = "this is Sheet A"
Sheets("B").Select
Range("A1").Select
ActiveCell.FormulaR1C1 = "this is Sheet B"
Sheets("A").Select
Range("A2").Select
ActiveCell.FormulaR1C1 = "I'm back to Sheet A"
Now, i have 2 macros that implement the same code described above.
one is a Command1_click in Sheet A
the other is shortcut macro : Ctrl + r in "Modules"
If i'm pressing Ctrl + r, it works perfectly.
if i click the button in sheet A,
something like this comes out :
Laufzeitfehler "1004":
Die Methode 'Range' für das Objekt '_Worksheet' ist fehlgeschlagen
Translated to : Error 1004
The method 'Range' for the object '_Worksheet' failed.
and sometimes : The 'Select' method from the Range Object can't be executed
what's wrong here?
is there anyway to make the Button work ?
I'd appreciate any help, thanks.