I have some slight knowledge about VBA and writing code.
But this has my mind boggled, and probably it is something really stupid.
I am trying to copy and paste Format and Formulas, from the row above.
By the push of a button.
The formulas should be 'dynamic', in the way that any...
Dim FinalResult As Variant, Table_Range As Range, LookupValue As Range
Set Table_Range = Sheets("Requestor").Range("A:B")
Set LookupValue = Sheets("Tax Cert Bill").Range("B12")
' original code ' FinalResult = Application.WorksheetFunction.VLookup(LookupValue, Table_Range, 2, False)
I encountered a problem where 1) I cannot paste the copied contents into the desired cell, and 2) an error 1004 PasteSpecial method of Range class failed popped up.
Here's my code:
'copy whole content from old quarter file with header added
Windows("Report002_" & year &...
Hello, I am using a modified version of code that normally has a "FolderPicker" to (1) open all workbooks in a designated folder and (2) to run a macro found in the other workbooks.
Instead of the FolderPicker I just pointed myPath to a range which inludes "\" at the end of the path.
This is my first post here, so sorry if I made any mistakes (this forum has helped me a lot before tho, thanks!).
I'm trying to make a macro that will delete everything within a range of cells, but I'm running into a weird issue.
There's a couple of checkboxes and a picture that don't get...
Please help with this new error that all of a sudden occurs in a spreadsheet that I have been using for 5 years now.
The spreadsheet works well on 3 other PCs.
All of the PCs are running on the latest update of win10 x64.
The relevant part of the VBA code reads:
‘ Klaar Macro...
I have the following piece of code running when opening a workbook.
I want this workbook to be shared, but when I open in shared mode this piece of code gives me a run-time error '1004': Application-defined or object-defined error.
Works fine when not in shared mode. I have googled...
I am trying to run the following code one after another for three different ranges.
The macro extracts the ranges and save them as pictures.
Sub ExportBRRangeToPNG() '--exports selected range to png file
' jpg is not appropriate format for this output
' default filename is...
I have 2 VBA codes that are almost identical to each other, the only difference is that one of them has a prompt for message box with input to fill in column B. Basically code 2 is identical to code 1, but with all the columns shifted one down (B-C, C-D, etc). Below is code 1
Can't quite see/figure out what I've done wrong (I don't know what I don't know :confused: ).
Run-time error '1004'
Method 'Range' of object '_Global' failed
I've tracked the error down (I think) to the FOR-NEXT loops in the following snippet of code (edited for...
I have recorded a macro and now it is giving me a runtime error 1004 "There's a problem with this formula" in connection with ExecuteExcel4Macro.
I have tried with double quotes without success ExecuteExcel4Macro "(2,1,"""";;;@"""")"
Can anyone point to an error in the code?
Hi Excel folks,
I m trying to move every second row at the end of previous row.
This below code is being applied from the third row. I m getting the desired out , but i m also getting the below error.
" run-time error 1004 : Application-defined or object-defined error".
I m aware that...
I have vba that purges data for public posting, then saves each tab (named range) as a separate pdf to combine & post to the web. I'm getting a Run-time error '1004' "This formula is missing a range or a defined name" on Named Range(Table_7), on Tab "Table 7", when trying to save...
I have 50 named ranges. Some of them are just a range, others have dynamic ranges (formulas). None appear to be incorrect. Everything is calculating correctly based off of the named ranges. I have used the Name Manager to filter for Names with Errors and there are none listed.
I need to...
I am getting belowerror while converting XML file to excel.
I have 2 files in a folder I am able to convert the firstfile were as 2nd file shows the below error.
The xml file cannot be opened because of error...
I want to create a name for the data range of a given table column, using the syntax "Table[Column_name]", so that if the table moves, expands, shrinks, is renamed, or reorder columns (...), the range referred to by the name is still correct (per opposition to use the range address syntax...
I am sure this problem has come up before, but as a tyro I just don't know where my code is going wrong. I an trying to set up a macro, which will copy some data from a summary sheet into another sheet in the same workbook. Here is the code which is giving me angst:
' Add the new sheet...
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).
I keep getting the following error and I don't know why:
Runtime Error '1004':
Method range of object global Failed
Here is my code with the line causing the issue denoted with the *.
Sub Button1_Click()ActiveSheet.Range("AL2:AL399").Value = 0
ActiveSheet.Range("BH2:BP399").Value = ""...
I am trying to create an automated script to automatically change multiple examples of the same field dropped into a pivot table into defined calculations of that field. eg change the first instance into average, second into stdev, 3rd into count etc.
This requires them to be renamed to...