LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 54
Default Runs in macro but not in procedure...why?

In trying to code a procdure I want to have range A5 as the starting location
for each sheet (to be used in code later as the active cell for each sheet
when made active.) I was having trouble so I recorded the key stroke as a
macro and it works. I copy the code to a procedure, run it from a command
button and I get the following error msg: Select method of Range Class failed.

Here is the simple code:
Sheets("Sheet1").Select
Range("A5").Select
Sheets("Sheet2").Select
Range("A5").Select

Help is appreciated.
 
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
VBA macro runs fine, but freezes if I try to do ANYTHING else whileit runs Rruffpaw Setting up and Configuration of Excel 1 September 17th 11 01:25 PM
One macro runs then it auto runs another macro PG Excel Discussion (Misc queries) 2 September 1st 06 09:30 PM
how to create a macro that runs other macro in the same workbook VB Script for Excel Excel Programming 4 March 23rd 06 03:53 AM
Macro runs in source , but not when in Personal Macro Workbook Darin Kramer Excel Programming 1 September 13th 05 04:48 PM


All times are GMT +1. The time now is 11:51 PM.

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

About Us

"It's about Microsoft Excel"