Trying to compile a workbook, I keep getting a few errors. Here are the first two:
Function TotalAdder(RCell As Range)
'Begins Error Handling Code
On Error GoTo Helper
Dim xIndex As Long
xIndex = RCell.Worksheet.Index
nsheet = Left(Tname...
I have the code below in a workbook. When I close the workbook, it typically kills all other open workbooks of excel. However, excel has started opening a blank window (no loaded workbook) in a second window whenever opening any excel file. Anybody have ideas on both of these. Further, sometimes...
As a reasonably seasoned excel user, im embarking on learning power query to try to achieve something which could quite well be impossible :) So hoping I can get some clarification from the real experts!
Situation: I have a CSV file provided to me every day detailing a list of...
I am getting a run time error 13 in my code between the **. Can anyone out there see why? For some reason the code will run and do what I want, but then spit out the error. Any help will be appreciated.
Dim i As Integer
I'm new to VBA so be gentle.
This just started happening today.
Whenever I select a preexisting command button to a macro, I get an error window listing the range as "Wrong number of arguments or invalid property assignment"
What can I do now?
On Error GoTo Quit:
MsgBox ("Please Add Data to Template Sheet" _
& vbNewLine & "Then Run Program")
I have the above code. The On Error GoTo Quit is at the top of the code, with the Quit: at the bottom. The problem is my message box keeps popping up, even when no errors...
I currently have data in cell AS2396 "04/11/2019 10:49:09", this then gets formatted to in BM column to read "04/11/2019" using formula "=TEXT(AS2396,"dd/mm/yyyy") and the world is great.
However, if no data is in column "AS" and say its in column "C", how can I add an if error to to select "C"...
I have a workbook that will convert multiple word documents at once into PDF format. I am combining two macros I found on the web to try and get them to open a word doc, place a watermark on the doc, and then export it as a PDF. It will do this once for each file in a folder that I specify in...
I have the following formula that is giving me a #VALUE ! error and I've been looking at it so long I can't see where the syntax is wrong. Can someone please help?
=IF(AND(Y17="Replacement2",Z8<3),"Wave "&'Project Data Sheet'!J73&" Print Order","Wave "&'Project Data Sheet'!B101&" Print...
Hello - I have the following macro and it is hanging up with a "next without for" compile error. I don't see what is wrong with it? Could someone please help me? It is hanging up on the line 'Next mycell".
Public Sub ProjNumbrReq()
Dim myCell As Range
Running a very basic test code to try out on a large amount of data, but having trouble, getting the "1004" error.
Dim c As Integer
'LOOPS THROUGH ALL ROWS
For c = 2 To 10
If IsEmpty(ActiveSheet.Cells(c, 1)) = False Then
ActiveSheet.Cells(c, 2) =...
Anyone able to assist a newbie on VBA coding, please.
I have learned some great stuff reading comments and watching online videos, etc.
But, I have patched together some code from various excel experts to:
1. save the file and then email as an excel attachment (.xlsx)
I got a question answered and then I posted another question in the same thread. I forgot I needed to post new questions in new threads.
I get an error with trying to insert the following formula into a cell in vba.
.Range("M11").Formula = "=IF([@[Wait Time/Hrs]]<3,3,[@[Wait Time/Hrs]])"
I am trying to insert a formula using vba but it gives me a syntax error, what is wrong with this line of code?
.range("C11").formula = "=IF(A11="","",IF(COUNTIF(Sheet2!$G$87:$DO$97,A11),"Public Holiday",IF(WEEKDAY(A11)=1,"Sun",IF(WEEKDAY(A11)=7,"Sat","Mon-Fri"))))"
Hello, I am attempting to create an error message msgbox in an Excel workbook/worksheet. I have the coding to create the msgbox but if the error is on the worksheet multiple times, it shows the error multiple times. I have tried using alreadyprompted coding to stop this action but I'm having...
Respected gurus, experts and MVPs,
I have written the following code for the pivot table and it is generating pi.Visible <Type Mismatch> error.
Dim lastrow As Long, endrow As Long
Dim Psheet As Worksheet, Dsheet As Worksheet
Dim Pcache As PivotCache, Ptable As...
I have number between 1M to 10M. So I wanted to format to show
1 M instead of 1 000 000
So I went to format cells-->custom and typed #,, M
But excel gave me error message
I had to write it like this #,,"M"
Why is that? If I wrote #,,K
excel wont give me error message. So only when I...
When Excel crashes my hyperlinks placed throughout the workbook break. I am trying to create a macro that will fix the paths of all the broken hyperlinks.
This is what I have:
Dim hl As Hyperlink
For Each hl In ActiveWorkbook.Hyperlinks
I'm passing a Range to my Form via a Property
Dim Rng as Range
Public Property Let rRange(z as Range)
Set Rng= z
Then I attempt to populate that range (which is a single cell)
Private Sub cmdApply_Click()
Worksheets("Sheet1").Range(rng).Value = Me.txtTest
I get error 1004...
Just wondering why this goes to error 91 "object or with block not set"
Dim MyRange as Range
Set MyRange = Application.Range("Sheet1!A2:G2")
' Set a= MyRange(1).comment.text
Both 'a=' lines result in the same error 91