Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default Question about RANGE (easy one, or at least it should be)

i don't see anywhere where renglon is defined, it is empty. it needs to be a
row number


--


Gary


"Omar" wrote in message
...
Hi,

I've got the next code:

Worksheets(1).Select
valor = CInt(Range("E16").Value)
Worksheets(2).Select
Select Case valor
Case 1
celda = "A" & renglon
Range(celda).Value = 1
Case 2
celda = "B" & renglon
Range(celda).Value = 1
Case 3
celda = "C" & renglon
Range(celda).Value = 1
Case 4
celda = "D" & renglon
Range(celda).Value = 1
Case 5
celda = "E" & renglon
Range(celda).Value = 1
Case 6
celda = "F" & renglon
Range(celda).Value = 1
Case 7
celda = "G" & renglon
Range(celda).Value = 1
Case 8
celda = "H" & renglon
Range(celda).Select
Range(celda).Value = 1
valor = CInt(Range(celda).Value)
Case 9
celda = "I" & renglon
Range(celda).Value = 1
Case 10
celda = "J" & renglon
Range(celda).Value = 1
End Select

I've been executing it with "valor" as 8; however, it always returns the
1004 error: an application error. (Amazing, isn't it?!!!)

By the way, it's supposed that "Range(celda).Value = 1" writes, stores,
-whatever- "1" in the cell, right? Well, guess what? It doesn't work. Which
is the correct sentence to do that?

Thanks in advance.

Omar.



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
Easy Question M&M[_2_] Excel Discussion (Misc queries) 3 July 24th 07 12:34 AM
An easy question... Maybe? Lydon Bergin Excel Programming 1 January 25th 06 05:09 PM
new user with easy question? not easy for me speakeztruth New Users to Excel 5 June 3rd 05 09:40 PM
Easy VBA question: range control J.B. Bobbitt Excel Programming 3 January 30th 05 12:59 AM
Easy Question Lawson Excel Programming 1 October 20th 03 09:28 PM


All times are GMT +1. The time now is 04:04 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"