So the current error I get is an End With without With
I've tried to add something that has "with" and then I get the error "For without Next"
and if I add a Next, then I get the error "Next without For"
What the heck am I doing wrong?
I'm trying to do the following tasks:
1. Create a folder...
VBA Will Not allow me to enter this formula as shown below............
ActiveCell.FormulaR1C1 = "=(GETPIVOTDATA("Total",'TKOFF Summary'!$A$3,"LEVEL 3","D" & Select_Row,"Area",F7,"CSI MF CODE","H" & Select_Row,"ITEM DESCRIPTION","I" & Select_Row,"Unit","K" & Select_Row7"
I keep getting the...
I have some code that I have written. I had it working then made a small tweak to it. The code publishes a letter of customer specific data from a template held in the workbook. I have been tweaking with the original code to change formatting and the eliminate pre-existing SQL queries that are...
I have created the following VBA macro in excel. The macro works fine until I get to the save as section at the end.
I have used the same code in other excel spreadsheet and its saves perfectly, although I get the following error message when I try to do it within this spreadsheet:
"Compile...
I'm been trying to find out what wrong with my code (In sht.Range....) but I don't see it. Can anyone help me?
Thanks so much
<code class="western"> ‘</code><code class="western">Move the cell contents to the next cell</code><code class="western"> </code>
<code class="western">...
Hi everyone,
I'm running a shared workbook on multiple computers, but it does not run on some Computers. On some computers the message "Compile error in hidden Module: This workbook" appears. And in the worst case, the program stops at simple functions like Today_Date = Date (). The computer...
I am writing a macro that will insert a formula in an empty cell that will look at the value in a different cell and based on the last character in the value, enter at different value in the formula cell. It will then copy-down, then copy and paste as values. Below is the code I have written...
Hello all,
I have the following bit of code which was recorded in the macro recorder and which works fine.
Range("M36").Select
ActiveSheet.PasteSpecial Format:="Csv", Link:=False, DisplayAsIcon:=False
I would like to reduce it to the below however i get "Compile error: Named arugument not...
I do a lot of forecasting and am tired of having to repeatedly write a formula from scratch to test whether or not my forecasts fall within the prediction interval. To be clear what I mean, is that I may predict a value of 1,000 with an 80% chance it will be within 900 and 1100. I need to test...
Hi
the following code is producing a "compile error - automation error".
Any help would be appreciated
Public Sub addmilestone(shapeleft As Integer, shapetop As Integer, shapeheight As Integer, shapewidth As Integer, shapecolor As Long, shapetype As MsoAutoShapeType)...
Hello,
I am trying to use a macro to remove middle initial (if it exists) from a list of names in column B. This formula is to be typed into cell D2. My formula works when I type it into excel, but not when I record it as a macro and run it. There is a compile time/syntax error. The code is...
Hello,
I'm working on shared files I created for multiple people to access on multiple computers (same type of computer, same excel 2016 software). It was working fine with the group I tested on, but as more people tried to use it, They’re getting an error that there is a problem within a...
Private Sub EnterButton_Click()
Dim MyPoNum As Long
Dim MyDate As Date
Dim MyQty As Long
Dim MyPNum As String
Dim MyRow As Long
Dim cmb As combobox, i As Integer
For i = 1 To 10
Set cmb = Me.Controls.Item("ComboBox" & i)
MyPoNum = Me.txt_PoNum.Value
MyDate = Me.txt_Date.Value...
I'm a newbie and trying to create a macro but just cannot figure out why I keep receiving this compile error. I thought this code was fairly straightforward. Can someone please help me troubleshoot? Thanks!
Sub Copy_Incompletes() '
'
'
Dim i, Totrows As Integer
Dim ws1 As Worksheet: Set ws1...
Hello All,
I have searched the boards and looked elsewhere but for whatever reason I cannot get this code to work for a password/login function I created. Whenever I enter the login credentials I get hit with a Compile Error: Block If without End If... I've had a few people look at it and we...
Trying to incorporate two modules into an excel sheet and am running into an issue that I haven't been able to diagnose. Independently the modules work but when both are in the file it gives me a "Compile Error: Wrong number of arguments or invalid property assignment" with the Sub line...
I have some VBA code which has been running quite happily for the last two or three years. Starting a couple of days ago it now fails every time with runtime error "Compile error. Automation error". There are no error numbers or codes given. On clicking OK on the error box the processing...
Hello everyone. I am having a problem with my macro. It is giving me a compile error "Next without for" when I added this line "If Sheet1.Cells(i, 9) = Active Then". It worked perfectly before I added I am sure I am just missing a simple line of text. Your help is much appreciated.
Sub...
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.