Formatting text in a a cell with selecting it.

  • Thread starter Thread starter ExcelMonkey
  • Start date Start date
E

ExcelMonkey

I have a line of code which puts text in a cell:

Comrng.Offset(-1, 0) = "Title"

If I want to format "Title" with bold, how do I do it
without doing

Comrng.Offset(-1, 0).Select
Selection.Font.Bold

That is, I do not want to select it. Can I wrap the
format function around it?

Comrng.Offset(-1, 0) = Format("Title", ???????)

Can't figure out what to do.

Thanks
 
Hi,
Comrng.Offset(-1, 0).Select
Selection.Font.Bold

That is, I do not want to select it.

well, then just don't select it...

Comrng.Offset(-1, 0).Font.Bold

When you're manipulating an object you do not have to select it, this
happens only in the macro recorder because you do it with the mouse.

arno
 

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