activecell.address problem

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

I'm using Office XP, I'm having a problem referencing the address of the
activecell. Here is a snip of my code

insertFormula(intcount, ActiveCell.Address(False, False, xlA1)

which is passed to

Function insertFormula(intcount As Integer, ByVal Target As Range) As String

I keep getting a 'Type Mismatch' error that highlites .Address.

Help is much appreciated.
Jason
 
That is because you are passing a string variable into a range - Type
mismatch. Pass the cell itself

insertFormula(intcount, ActiveCell)


--

HTH

RP
(remove nothere from the email address if mailing direct)
 
Jason said:
Hi,

I'm using Office XP, I'm having a problem referencing the address of the
activecell. Here is a snip of my code

insertFormula(intcount, ActiveCell.Address(False, False, xlA1)

which is passed to

Function insertFormula(intcount As Integer, ByVal Target As Range) As String

I keep getting a 'Type Mismatch' error that highlites .Address.

Help is much appreciated.
Jason

Use ActiveCell rather than ActiveCell.Address

/Fredrik
 

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

Back
Top