Text with Dates

L

littlegreenmen1

in cell A1 i have some text. in cell B1 i have a date. how do I get
Excel to display both the text and the date. I've tried:

Dim olDate As Range
Dim olText As Range
Set olDate = Sheet1.Cells.Item(1,"A")
Set olText = Sheet1.Cells.Item(1,"B")
..Subject= olText +" - " + olDate

I was hoping to get something like "text - 6/9/05" in the subject bar,
but everytime I do this i get a run time error. i've tried replacing
the date with text and it works just fine, and i've also tried just the
date cell and it works fine. the problem comes up when i try and combine
the date and text. both

Any help would be much appreciated. Thank you in advance.
 
B

Bob Phillips

Subject = Sheet1.Range("A1").Value & " - " &
Format(Sheet1.Range("B1").Value,"dd mmm yyyy")

--
HTH

Bob Phillips

"littlegreenmen1"
 

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