Error 1004 while getting Cell Name

A

Ashish

Hi,

I have the following simple Macro. I get a Runtime Error 1004 "Application
defined Or object-defined error" when the MSGBOX statement attempts to
execute.

***************************************************
Sub Macro1()

Dim myrow, mycol As Integer

Sheet1.Activate
Sheet1.Cells(1, 1).Select
MsgBox Sheet1.Cells(1, 1).Name, vbOKOnly


End Sub
***************************************************

Please help urgently!!!

Thanks and regards,
Ashish Sardey
 
M

Mike H

Hi,

Do you mean it's defined name? If so try this

MsgBox Sheet1.Cells(1, 1).Name.Name

Mike
 
A

Ashish

Hi Mike,

I tried this option as well. It doesn't work, and gives the same error.
Please help urgently.

Thanks and regards,
Ashish

**************************************************
 

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