compile error

  1. C

    If/Else error in VBA code (Else with out If error)

    Hello! I am currently working through some tutorials on youtube to help me figure out the syntax for VBA. While doing this I hit a road block - I am getting an error BUT I (think anyway) am following along exactly as the video does. And it works in the video. If the cells A7 & B7 are empty the...
  2. S

    Compile Error: Expected end of Statement using SUM formula in variable range loop

    Hi there, New to this forum and I love it! I have searched and searched but can't seem to find an answer that resolves my problem. I am using a loop in a macro that groups and subtotals columns for data categories. The data the macro is run on varies greatly in size each time, but the...
  3. M

    Compile Error

    Hi All, I've been asked to test excel docs as we are changing from office 2007 to 2016. Running the following code, I receive a Compile Error - Can't Find Project or Library. Public Sub BatchPDF() Dim n As Integer, i As Integer Application.ScreenUpdating = False If...
  4. R

    Calendar error in another PC Macros

    Hi, I've made a program using Calendar Controls on excel 2007, and it's running perfectly in my PC, but when I send the file to a coworker with the same excel version it displays a compile error and highlights the Calendar.Value command, and when I click on design mode on my partner's PC the...
  5. V

    Compilation error : BLOCK IF WITHOUT END IF

    If ((char = ",") And (cou >= 10)) Then add = add + char + vbNewLine c = 1 cou = 0 Else add = add + char c = 0...
  6. M

    User type not defined error!

    I use VBA code to create and save pdf file however I receive error :"user type not defined " The highlighted line like the following; Dim pdfjob As PDFCreator.clsPDFCreator PDF creator is already set as a reference. The code works on another computer with Excel 2003, however not working on...
  7. T

    Compile error: Invalid Qualifier (VBA)

    Sub PDFCreator() ' ' PDF Creator Macro 'This should create an individual PDF for each variable and save it in the correct location ' ' 'Define the save location ' Dim FName As String Dim FPath As String Dim rng As Range, cell As Range FPath = "Q:\Files\ FName =...
  8. A

    Month Function- Compile error Wrong number of arguments or invalid property assignment

    Hi Below is a piece of code which is giving me error "Compile error Wrong number of arguments or invalid property assignment" This is not the complete code, however at every month function I am getting this error. Need help on this !!! count = Range("A1", Range("A1").End(xlDown)).count...
  9. S

    Compile Error: Else without If

    Good morning all, I'm trying to create a calendar on excel. I'm not proficient in VBA at all but I was able to find a youtube video that matched what I wanted to do. I copied the code but now I'm getting this error: Compile Error: Else without If on this part of the code: 'determine what...
  10. B

    Compile Error: Invalid Qualifier

    Sub CommandButton8_Click() Dim vlookprint As String Dim colindexvalyoo As Double Dim resizevalyoo As Double resizevalyoo = Sheet1.Cells(19, 12).Value colindexvalyoo = Sheet1.Cells(16, 12).Value vlookprint.Resize(resizevalyoo, 1).Formula = "=VLOOKUP(Sheet1!B16,Sheet2!" _ 'compile error on...
  11. B

    Compile Error: Expected: end of statement ? Simple code

    Hi everyone again! I have a very simple line of code : I am trying to set up a value contained in cell O59 as my col_index_value in a Vlookup. So i dont have to type the column index number in the formula, I can just use ColIndexVal. Im getting a compile error. Sub VertLookLiteral() dim...
  12. L

    Compile Error with COUNTIFs

    <tbody> 0 down vote favorite I was wondering if you could figure out what was wrong with the following command...
  13. J

    Macros and Excel 2013

    Hello there, now I got this very annoying situation with my Excel 2013. Ever since some updates were installed, I can't enable macros in Excel. Even after changing to "Enable all macros" in macro settings I receive an Compile error. After switching back to "disable all Macro with notification"...
  14. C

    VBA: Compile Error when run on mac

    When I run the following code on a PC (Excel 2013) it works fine. When I run it on a Mac I get a Compile Error (Expected Function or Variable) at the line: "With ActiveCell.SpecialCells(xlLastCell).Select" Sub import_reccurring_transactions() Application.ScreenUpdating = False ' name...
  15. C

    Compile error

    When running my macro I received a compile error stating the procedure is too large. Does this error mean there are too many formulas for this macro? How do I fix it?
  16. J

    User-defined type not defined

    I am have here a code to retrieve an actual price of a stock from Google Finance. <code>Function StockQuote(ByVal Stock) Dim URL As String Dim http As New MSXML2.XMLHTTP Dim stockdoc As New HTMLDocument URL = "https://www.google.com/finance?q=" & Stock http.Open "GET", URL, False http.Send...
  17. P

    Macro to Save Excel as PDF using cell name - Compile Error

    Hello, I've recorded a macro to save various files down as PDF's, but I would like to be able to make the location and filename variable, as I save these down each week in a new folder, and with a new name based on the week number. I've looked at numerous threads on how to do this, and have...
  18. B

    Compile Error

    I have copied a workbook to another computer and every time I try to run some of the code in it I keep getting all these different Compile Errors. Possible Solutions? Thanks as always Jamey
  19. M

    VBA Next without for complie error

    Hi there everyone, I've recently been trying to learn some basic vba to help with duties at my work. I've been following some youtube videos and came into a problem i cant seem to find the answer for. I keep getting a 'next without for' compile error. I know its because i was following youtube...
  20. P

    Compile Error when calling a sub function

    Hi guys, I'm new in this forum and a noob in excel VBA. I have some issues with sub functions. I created a sub function that I can call inside another sub function but it returns a "Complie Error: Expected: =" My goal is to format cells with the number of "*" here is how i call the 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