PDA

View Full Version : Reference cell that has the fax number



Lartk
01-18-2013, 10:58 AM
The below code is used to fax:


Set oRecipient = .Recipients.Add("11111111@test.com")
oRecipient.Type = 1[


In cell E5 of the spreadsheet, it says Fax:111-111-1111

Is there a way to set the =.Recipients.add("SET THE FAX NUMBER TO REFERNCE CELL E5)?

But the only problem is in cell E5, before the fax number comes Fax:

So I would need to reference =RIGHT(E5,12). Is that possible?

Bob Phillips
01-18-2013, 11:48 AM
Do you mean


Set oRecipient = .Recipients.Add(Replace(Range("E5","-","")) &"@test.com")

Lartk
01-18-2013, 02:48 PM
Well in cell E5 is FAX:111-111-1111

So I need to reference the =RIGHT(E5,12) in order to get 111-111-1111

But i dont know how to reference that in replacement of the number below


Set oRecipient = .Recipients.Add("11111111@test.com")

Is there a way to do :


Set oRecipient = .Recipients.Add(.Cells(Right(E5,12))

?? or something like that?

Lartk
01-23-2013, 11:20 AM
Set oRecipient = .Recipients.Add(Replace(Range("E5","-","")) &"@test.com")

Is there a way to set the range here as


.Cell E5 = FormulaR1C1 = "=RIGHT(R[-2]C,12)"

?

Lartk
01-25-2013, 10:23 AM
Any ideas?