ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Formula to VBA (https://www.excelbanter.com/excel-programming/378890-re-formula-vba.html)

John Bundy

Formula to VBA
 
tmpname = Left(Range("B1"), 3) & " " & Right(Range("B1"), 2)

"Ronbo" wrote:

What is the VBA routine that is the equivalent to the formula;

= Left(B1, 3) & " " & Right(B1, 2)

When I use:

tmpName = Left(B1, 3) & " " & Right(B1, 2)
MsgBox tmpName

In works without an error, but the message box is empty?

As always, any help is appreciated.

Regards
Ronbo



All times are GMT +1. The time now is 03:38 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com