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

I meant

Sheets("sheet9").Cells(worksheets(1).Range("e16"), 4) = 1

--
Don Guillett
SalesAid Software

"Don Guillett" wrote in message
...

Not sure what "celda" is? But this one line idea may work.

worksheets(2).range("celda")=cells(4,worksheets(1) .range("e16")) = 1

--
Don Guillett
SalesAid Software

"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 VBA question Dallman Ross Excel Discussion (Misc queries) 2 August 6th 07 01:26 AM
Question about RANGE (easy one, or at least it should be) Gary Keramidas Excel Programming 2 December 19th 06 07:20 PM
Easy Question holyearth Excel Programming 11 June 6th 06 07:54 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


All times are GMT +1. The time now is 10:24 PM.

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"