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. |
All times are GMT +1. The time now is 04:36 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com