#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Error 1004

when I type

range("A1").select

I get error 1004

why?

Moiz


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Error 1004

Hi Moiz,

The error would occur if the active sheet were not a worksheet but , say, a
chart sheet.


---
Regards,
Norman



"Moiz" wrote in message
...
when I type

range("A1").select

I get error 1004

why?

Moiz



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Error 1004

It seems to accept Worksheets("Sheet1").Cell(1, 1).Select

but not

Range ("A1").Select

Any idea?
(it is not a chart sheet, and the Options/General is not set for RC)

"Norman Jones" wrote in message
...
Hi Moiz,

The error would occur if the active sheet were not a worksheet but , say,
a chart sheet.


---
Regards,
Norman



"Moiz" wrote in message
...
when I type

range("A1").select

I get error 1004

why?

Moiz





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Error 1004

It sounds like you have this code in the sheet module of a worksheet other
than Sheet1. If so, that is your problem. Likewise you could solve it with

Worksheets("Sheet1").Range("A1").Select

or

Activesheet.Range("A1").Select

Your solution was qualifying the range reference, not whether it was
Range("a1") or Cells(1,1)

--
regards,
Tom Ogilvy



"Moiz" wrote in message
...
It seems to accept Worksheets("Sheet1").Cell(1, 1).Select

but not

Range ("A1").Select

Any idea?
(it is not a chart sheet, and the Options/General is not set for RC)

"Norman Jones" wrote in message
...
Hi Moiz,

The error would occur if the active sheet were not a worksheet but ,

say,
a chart sheet.


---
Regards,
Norman



"Moiz" wrote in message
...
when I type

range("A1").select

I get error 1004

why?

Moiz







  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Error 1004

I found the problem,
It was keeping the focus on a text box, not allowing the selection of a
different worksheet.

Thanks for your help.

Moiz

"Tom Ogilvy" wrote in message
...
It sounds like you have this code in the sheet module of a worksheet other
than Sheet1. If so, that is your problem. Likewise you could solve it
with

Worksheets("Sheet1").Range("A1").Select

or

Activesheet.Range("A1").Select

Your solution was qualifying the range reference, not whether it was
Range("a1") or Cells(1,1)

--
regards,
Tom Ogilvy



"Moiz" wrote in message
...
It seems to accept Worksheets("Sheet1").Cell(1, 1).Select

but not

Range ("A1").Select

Any idea?
(it is not a chart sheet, and the Options/General is not set for RC)

"Norman Jones" wrote in message
...
Hi Moiz,

The error would occur if the active sheet were not a worksheet but ,

say,
a chart sheet.


---
Regards,
Norman



"Moiz" wrote in message
...
when I type

range("A1").select

I get error 1004

why?

Moiz











  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Error 1004

Obviously that would be problematic for either

cells(1,1).Select
or
Range("A1").Select

But believe what you like.

--
Regards,
Tom Ogilvy

"Moiz" wrote in message
...
I found the problem,
It was keeping the focus on a text box, not allowing the selection of a
different worksheet.

Thanks for your help.

Moiz

"Tom Ogilvy" wrote in message
...
It sounds like you have this code in the sheet module of a worksheet

other
than Sheet1. If so, that is your problem. Likewise you could solve it
with

Worksheets("Sheet1").Range("A1").Select

or

Activesheet.Range("A1").Select

Your solution was qualifying the range reference, not whether it was
Range("a1") or Cells(1,1)

--
regards,
Tom Ogilvy



"Moiz" wrote in message
...
It seems to accept Worksheets("Sheet1").Cell(1, 1).Select

but not

Range ("A1").Select

Any idea?
(it is not a chart sheet, and the Options/General is not set for RC)

"Norman Jones" wrote in message
...
Hi Moiz,

The error would occur if the active sheet were not a worksheet but ,

say,
a chart sheet.


---
Regards,
Norman



"Moiz" wrote in message
...
when I type

range("A1").select

I get error 1004

why?

Moiz











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
Run time error 1004, General ODBC error [email protected] New Users to Excel 0 September 19th 05 01:41 AM
run-time error '1004': Application-defined or object-deifined error [email protected] Excel Programming 5 August 10th 05 09:39 PM
Excel 2003 Macro Error - Runtime error 1004 Cow Excel Discussion (Misc queries) 2 June 7th 05 01:40 PM
Application Run Time Error 1004 and Stack Error ExcelMonkey[_190_] Excel Programming 9 February 11th 05 04:48 PM
Interior class error/runtime error 1004 David Goodall Excel Programming 1 October 24th 04 10:16 PM


All times are GMT +1. The time now is 12:10 AM.

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"