Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Error When Assigning a Macro to a Command Button

On 24 Jan, 16:15, mikesaysgobears
wrote:
Thanks for the help - this got me through this problem, but exposed another!
I think the best place for me to start is a book to reference basic issues.
Any suggestions?



"Jim Jackson" wrote:
If your macro is in the sheet's code window you must use:
Activesheet.Range("A1:AN81").Select


--
Best wishes,


Jim


"mikesaysgobears" wrote:


I'm trying to assign a macro (that works with the keyboard shortcut) to a
command button so that others will easily be able to run all the macros on
individual buttons.


I get the following error immediately:


Run time error '1004':


Select method of Range class failed


When I go to debug, the following text is highlighted in yellow:


Range("A1:AN81").Select


This macro is taking data from one spreadsheet and importing it into another
to complete several tests. This is my first foray into writing in depth
macros, so help in laymen's terms would be greatly appreciated.


Thanks- Hide quoted text -- Show quoted text -


To be honest I wouldn't use a book to start with. Read the help file
and the archives of this group for each question as it comes...

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Assigning A Macro to A Button Holly Excel Worksheet Functions 1 January 18th 08 10:04 AM
Assigning Macro to a Command Button melaniem Excel Discussion (Misc queries) 3 January 11th 08 06:01 PM
Assigning a command button to a macro Rich D Excel Discussion (Misc queries) 6 October 30th 07 06:01 PM
Assigning a macro to a command button SheriTingle Excel Discussion (Misc queries) 1 September 25th 06 06:34 PM
Help in assigning a command button Fybo Excel Discussion (Misc queries) 1 September 19th 05 07:36 PM


All times are GMT +1. The time now is 02:50 AM.

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

About Us

"It's about Microsoft Excel"