Strings w/ Copy and Paste

hvaccooling

New Member
Joined
Jul 3, 2017
Messages
3
Dim price As String
price = Sheet1.Cells(39, 2).Copy: wdapp.Selection.PasteAndFormat xlValue
.TypeText "The following agreement price is" & price & "wsfwfwf"

This is the result i'm gettting...Why True? and the number before? can someone please explain thanks!
$25,819.80
The following agreement price isTrue$25,819.80
an annual payment of.
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
Your question isn't really clear but if I understood correctly, you don't need to copy/paste the value in cell(39,2)

Try the below code

Code:
Sub test()

Dim price As String
price = Sheet1.Cells(39, 2).Value

MsgBox "The following agreement price is " & Format(price, "$#,###.00") & " wsfwfwf"

End Sub
 
Upvote 0
judging by
Code:
wdapp.Selection.PasteAndFormat xlValue
I'm guessing that you're trying to pate this into Word.
Your best bet is to show us all your code not just a couple of lines
 
Upvote 0

Forum statistics

Threads
1,216,129
Messages
6,129,055
Members
449,484
Latest member
khairianr

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top