Get value in a cell

G

Guest

How can I get the value from one cell (row=1, column = 14)? I need the value
from this cell as the upper limit for a loop.
I have the following code, but it is not working:

cMaxRows = Worksheets("Complete").Cells(l, 14).Value

I have the following error:
Run-time error '1004': Application-defined or object-defined error.

Can anyone help me with this? Thanks in advance.
 
J

JE McGimpsey

Incidently - that's exactly why you should have

Option Explicit

at the top of every code module.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top