pastespecial

  1. L

    VBA PasteSpecial method Worksheet class failed

    Hello everyone, I have a code which starts this: Private Sub CommandButton1_Click() Dim destination As Worksheet Set destination = Worksheets("STATS") Set myIE = CreateObject("InternetExplorer.Application") myIE.Navigate "https://www.internetpage.com/lblabla.html" myIE.Visible = True...
  2. H

    Multiply then copy

    Hi - Is there a way to use a macro to multiply .Range("P" & .Rows.Count).End(xlUp) and ws1.Range("A10") then paste the value in ws1.Range("C10")? I guess I could use .Formula, but I was also reading about PasteSpecial and xlMultiply. I just haven't been able to figure out how exactly to use...
  3. M

    PasteSpecial macro not working after cut

    Hi, I am trying to cut a range in workbook1 and paste it using a PasteSpecial macro in Workbook2, but I am getting an error. The PasteSpecial macro works fine when I copy the range instead of cutting it. In macro 1, I use the following code to cut a range into the clipboard: Range(Temp...
  4. E

    VBA Code to combine VLOOKUP and Pastespecial

    Every morning I have to manually copy and paste information from cells because VLOOKUP doesn't carry over formatting. I am very beginner to VBA.... Basically I have cells that contain information laid out like such: <tbody> Product Name DOCKET ABC <del>1234</del>TEST BCD 2345 TEST...
  5. E

    VBA PasteSpecial causing Run-time error

    Good Morning, I have a workbook containing 7 sheets (4 of which are 'project list' working sheets, and 1 a summary sheet 'Gantt'). The gantt sheet has 4 contiguous tables with headers and a gantt chart line for each listed project in column D. It's format is not the same as the working sheets...
  6. Small Paul

    Paste Special - Run-Time Error 1004

    Hi I am having difficulty with a Paste Special line in my VBA and cannot work out why. I have searched various websites and tried a load of different things, without success! The section of code is: Worksheets("Required Data").Activate ActiveCell.Offset(0, 2).Copy detail = ActiveCell.value...
  7. H

    Combine 2 Macros

    Hello, I have a workbook with 3 sheets, I am trying to copy the first 2 sheets to a new workbook without formulas. Each sheet needs a set range, which is different, can I combine these 2 Macros together? Sub JointingTracker() Sheets("jointing Tracker").Copy Range("A1:P70").Copy...
  8. J

    help on syntax logic on paste special

    Hi everyone I have a small issue here and would like to seek some advice from the veteran around here. I did the following code to copy and paste some information. however, I have managed to achieve a copy and paste into the worksheet I want. How do I change the part that's in red to copy and...
  9. H

    macro to copy data from sheet3to sheet4 using paste special values

    I have the following code which I have written to copy data from sheet3 to Sheet 4 using paste special values I get invalid qualified when running the macro PasteSpecial Paste:=xlPasteValues.Sheet(4).Range("A1") It would be appreciated if someone could amend me code Sub...
  10. J

    Pastespecial Triggering Worksheet_Activate to run

    Greetings, When running the code below in a new workbook, with Sheet1 activated and with application.enableevents=True, the PasteSpecial line causes the Sheet1 and Sheet2 Worksheet_Activate codes to run (as well as their respective Worksheet_Deactivate events. Moreover, when the pastespecial...
  11. S

    PasteSpecial Method of Range Class Failed

    I would like to be able to take data presented along a single row and have it moved to a single column. The code below is what I have constructed in order to accomplish this task. I am receiving an error "Pastespecial method of range class failed" on the line immediately below. Why is it...
  12. R

    Problem in getting PasteSpecial together with Unicode text to paste where I want.

    I can get :- ActiveSheet.PasteSpecial Format:="Text", Link:=False, DisplayAsIcon:=False to work. But setting the active cell is not straightforward. Workbooks("myBook").activate always works but Cells(1, 1).select (and Cells(1, 1).activate) sometimes work but are both unreliable. Can...
  13. R

    On error and paste.special

    I have a sub which starts with an On Error GoTo and then continues to use a PasteSpecial. (I can paste code if required, but I suspect there may be an easy answer from someone here!) Now if there is nothing to paste it does not go to the label but just stops at the PasteSpecial. I suspect this...
  14. E

    Resize a picture of excel chart and paste into word

    Hi, Hope you can help. My VBA code copies excel charts and then pastes into word doc which has bookmarks. How would I resize the copied chart after it is copied so that it will fit in the area of the doc? Sub Chart_copy() Dim wdApp As Word.Application Dim wdDoc As Word.Document Dim...
  15. S

    VBA Noob, PasteSpecial problems

    Hi Folks, Complete VBA Noob here. Been reading these forums for a long time. Finally found a topic I can't find anywhere. I've got a number of frozen panes at the top of a spreadsheet referencing the active row of the same sheet. I've used this code to transpose my active cells to the...
  16. T

    PasteAsValues into selection

    Hi There, I have the following code pasted below attached to a button: This is really annoying me because the code works if the worksheet is unprotected BEFORE running the macro. However if the worksheet is protected the code produces the following error '1004' Paste special method of range...
  17. F

    Pastespecial method of range class failed 1004

    Hi, I have 2 sets of code. One copies the form and the second pastes it. (the ancillary functions are sheet hide unhide etc) The problem is, at times the codes work perfectly fine. But sometimes i get the "pastespecial method of range class failed 1004" error. I have created an excel ribbon...
  18. E

    Paste Values in Specific Location

    This works: ws.Range("N1").Select ActiveSheet.PasteSpecial Format:="Unicode Text", Link:=False, _ DisplayAsIcon:=False, NoHTMLFormatting:=True This does not: ws.Range("N1").PasteSpecial Format:="Unicode Text", Link:=False, _ DisplayAsIcon:=False, NoHTMLFormatting:=True How do I...
  19. W

    PasteSpecial Error

    I'm copying (Ctl-C) tabular data from a website and wanting to Paste it into my spreadsheet. When I manually select the destination cell and type Ctl-V it works just fine. However, when I try Pasting it via VBA I'm getting the Run-time error 1004 (PasteSpecial method of Range class failed). My...
  20. J

    VBA Copy and Paste Values not working

    This code "works" however it will copy over the formulas, I need it to only copy the values. Most of the threads say to do .PasteSpecial xlPasteValues, as you can see I did that below . I am working in two separate workbooks. Am I missing something? :confused: TIA!! Application.DisplayAlerts =...

Some videos you may like

This Week's Hot Topics

Top