Solved VBA 2007 making up a mmessage

March 28, 2012 at 07:57:40
Specs: Windows XP
What I am trying to do seems simple but I cant do it right
Basically I have 2 worksheets (Sheet1 & WC)
On Sheet1 on Cell C33 Im trying to make a message like:

Crediting Dealer $280.21 for Lease Loyalty payment

The only problem I a have is pulling the amount 280.21 from the WC sheet
This is what I have:

Range("C33").Value = ("Crediting Dealer $") + ActiveWorkbook.Worksheets("WC").Range("I39").Value + (" for Lease Loyalty payment")

"I39" is 280.21
How can I convert it to text??? Thanks in advance


See More: VBA 2007 making up a mmessage

Report •


#1
March 28, 2012 at 08:32:52
Can't help with the Macro, but why don't you just us a formula:

="Crediting Dealer "&WC!I39&" for Lease Loyalty payment"

MIKE

http://www.skeptic.com/


Report •

#2
March 28, 2012 at 08:40:58
Thanks but it doesnt work.
This is just part of the first situation... there are 15 type of adjustments with about 2 to 3 different messages for each type. I just need excel to pick up that amount and paste it as part of the message.

Report •

#3
March 28, 2012 at 08:59:30
✔ Best Answer
Just an observation, from what little I know about macros', shouldn't you be using the concatenate symbol, not the plus sign to combine the string?

Range("C33").Value = ("Crediting Dealer $") & ActiveWorkbook.Worksheets("WC").Range("I39").Value & (" for Lease Loyalty payment")

MIKE

http://www.skeptic.com/


Report •

Related Solutions

#4
March 28, 2012 at 09:07:28
Thank you very much that worked!!!

Report •


Ask Question