How to fix errors ActiveSheet.PasteSpecial Format:="Text", Link:=False, DisplayAsIcon:= _False

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
Please see this photo
 

Attachments

  • Ảnh Bitmap Mới (2).jpg
    Ảnh Bitmap Mới (2).jpg
    238.1 KB · Views: 8
  • Ảnh Bitmap Mới.jpg
    Ảnh Bitmap Mới.jpg
    115.6 KB · Views: 9
Upvote 0
Hi Nguyen,

When it comes to sharing Sample Data, you'll want to use the Forums Excel Add-In here: XL2BB - Excel Range to BBCode
It makes it much easier and people are more willing to offer assistance if you make it easy to provide the data in an easy to replicate format using that Add-in.
Plus, most people - if not everyone here- will not download Macro-enabled workbooks they don't trust...

When sharing VBA code, just paste it in the post and use the quick wrap for VBA code icon; labeled VBA.

As for the image I saw; I'm no expert, but I think all you need to Paste Values Only is the following.
You can try this macro as a standalone test on any empty cell. Be sure to copy something first... :cool:
VBA Code:
Sub Paste_Values_Only()

    'Paste Values
    ActiveSheet.PasteSpecial Format:="Text"

End Sub
Hope this helps...
 
Upvote 1
Do you know what that macro is actually meant to do ?
Paste normally follows a "Copy" and there is no copy.

In case anyone else wants to buy into this thread here is the code in the picture:
VBA Code:
Sub Paste_and_calculate()

' Paul Gander - June 2017

    Dim lastrow As Long
   
    lastrow = Range("input").Rows.Count
    Range("a2:b" & lastrow).Value = ""
   
    Range("A1").Select
    ActiveSheet.PasteSpecial Format:="Text", Link:=False, DisplayAsIcon:= _
        False
    Selection.Name = "Input"
    lastrow = Range("input").Rows.Count
    Range("b1:b" & lastrow).FillDown
   
End Sub

And here is the Sheet as an XL2BB
Note: There is a button on the sheet that calls that macro.

Total length v02.xls
ABCDEF
1 AutoCAD units:mm
2
3Output units:m
4Precision:3(No. of decimal places)
5
6
7
8
9
10Total length =0.000m
11
Sheet1
Cell Formulas
RangeFormula
B1B1=IF(NOT(ISERROR(SEARCH("length",A1))),IF(MID(TRIM(A1),8,1)="=",VALUE(MID(TRIM(A1),9,SEARCH(",",TRIM(A1))-9)),VALUE(MID(TRIM(A1),8,28))),IF(NOT(ISERROR(SEARCH("circumference",A1))),VALUE(MID(TRIM(A1),15,35)),IF(NOT(ISERROR(SEARCH("perimeter",A1))),VALUE(MID(TRIM(A1),11,31)),"")))
E10E10=IF(Output_unit<>"ft-in",FIXED(Output,Output_precision)&OFFSET(Unit_list_base,0,MATCH(Output_unit,Output_unit_list,0)-1),INT(Output)&"'-"&FIXED(MOD(Output,1)*12,Output_precision)&"""")
Named Ranges
NameRefers ToCells
Input=Sheet1!$A$1:$A$45B1
Output_precision=Sheet1!$E$4E10
Output_unit=Sheet1!$E$3E10
Cells with Data Validation
CellAllowCriteria
E1List=Input_unit_list
E3List=Output_unit_list
 
Upvote 1

Forum statistics

Threads
1,224,586
Messages
6,179,730
Members
452,939
Latest member
WCrawford

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