compile error

  1. R

    End With without With, BUT WITH EXISTS!

    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...
  2. E

    VBA Will Not allow me to enter this formula as shown below.

    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...
  3. E

    Cannot Find Missing Statement Closing

    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...
  4. S

    Compile error: Expected: Expression

    Hey everybody. I've tried to make some simple calculations, but you see what happened. What is the reason of the compile error?
  5. T

    VBA save as error & VBA Paste in UPPER CASE

    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...
  6. M

    Compile error

    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">...
  7. G

    Computer Excel 2016 doen't recognize some Functions like Date, Range...

    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...
  8. M

    "Compile error: Expected: expression"

    Hi, This message is coming up and I can't figure out what's wrong, could someone please assist? qurl = "https://trader.di.se/index.php/stock_history?" & Ticker & "&startdate=" & MonthName(Month(sdate), True) & "+" & Day(sdate) & "+" & Year(sdate) & "&enddate=" & Monthname(Month(edate), True)...
  9. C

    Macro Compile Error

    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...
  10. S

    Paste Special CSV

    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...
  11. V

    Simple conditional output failure aka Prediction Interval Testing - should be an easy VBA fix

    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...
  12. P

    Compile Error - Automation Error

    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)...
  13. A

    Excel VBA Compile Time/ Syntax Error with a long formula

    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...
  14. J

    Shared File References Update

    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...
  15. R

    Next without For

    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...
  16. P

    Compile Error: End If without Block If

    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...
  17. G

    Block If without End If Compile Error

    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...
  18. D

    Compile Error to working VBA when new module added

    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...
  19. B

    Compile error, Automation error - Global variable problem?

    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...
  20. D

    Macro Compile Error "Next without for"

    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'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