1. W

    VBA Code next line continuation

    Hi one and all, I am trying to use VBA to put a very long formula into a cell, why such a long formula? Don't ask! When the code is entered into the cell as a formula, manually, it worked fine. But after coding the formula into VBA using multiple next line continuations " _" (because it is such...
  2. E

    Is there a way how to fix the Compile error in VBA

    I'm trying to get some tables from the web to put in excel and in my VBA code I'm receiving an error on VBA below I will post my code and if someone can check where is the error, and what I need to do to fix it the problem that I'm having. Thank you. Problem pic Sub GoToSpace() Dim BaseURL As...
  3. K

    'Next without for' compile error

    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() 'Call ProjNumbrReq Dim myCell As Range With...
  4. R

    Help with Compile Error

    I am getting a compile error: Syntax error on this line, but can't figure out what the problem is. I am obviously new to this. Mess = Replace(Replace(Mess, "#FirstName#", FirstName), "#team#", Team), "#gamedate#", gameDate), "#location#",Location), "#gametime#",Time"), "#field#",Field))...
  5. C

    Excel 2010 Macros not running in Excel 2016

    Hi everyone, I hope this is only a setup condition that someone identifies, but the transition from Windows 7 and Excel 2010 to Windows 10 and Excel 2016 has caused a lot of agita. For starters, environ("username") was not recognized (compile error Can't find project or library). Found out...
  6. C

    Compile list from multiple worksheets

    I have multiple worksheets with item names in column A and their corresponding colours in column B, of each worksheet. Each sheet may often have different item names in column A, same names but different colours and their positions may change based on their ranking. I want to compile a list of...
  7. S

    Compile Error - Versions

    Can anyone tell what the prob might be. Getting compile error on start up. Used to work fine. Then they upgraded to Windows 10. I suspect a 32/64 bit confliction. Any suggestions? Thanks Option ExplicitPrivate Declare Function ShowWindow _ Lib "user32" _ (ByVal hwnd As Long, _ ByVal nCmdShow...
  8. P

    Compile Error while inserting into cell

    I'm an trying to get concatenate string of text that will be a large formula into I2, but I receive a Compile Error: Argument not Optional. Here is my most recent code. Dim Form, a, b, c, d, e, f, g, h, i, j, k As String Dim TxtRng As Range Dim wb As Workbook Dim ws As Worksheet a =...
  9. N

    Compile Error

    Per the below macro, i am getting a compile error for the line in red. In short i want to see if any row in column D if there is a Number 5080 than print the word NOTHING otherwise the word NONEED, than goto the next row. can someone let me know where the error maybe? thanks Sub Nyexcel3()...
  10. L

    Run code dependent on Excel version

    I have a need to turn off ThisWorkbook.AutoSaveOn if it is on. Easily done, however if the user opens the workbook using 2013 or earlier, the VBAProject fails to compile. Perfectly understandable. My question is ... is there a way to code the test in the VBA but "ignored" if not valid? For...
  11. A

    Compiling Worksheets from the Same Workbook

    Hi Everyone, I'm trying to compile 6 worksheets from the same workbook, into 2 separate worksheets. In this instance I am trying to copy data from the 3 publisher content tabs into a master sheet, but I am getting an error with this line of code For Each ws In...
  12. U

    How to fix "Compile error" displays, "Variable not defined"

    Question for you. Sheet 1&2 name titles need to be changed with the following titles: Sheet1= PrePaidReport, Sheet2 = NewFormat, after I made the changes inthe VBA Script, Sheet titles change to capital letters, then I get, "Compile error" displays, "Variable not defined".
  13. R

    Simple Compile Error - Expected End Sub

    I'm really new to VBA coding and would highly appreciate if you can help me with the error as per the screenshot <a href=""><img src="" alt="Compile-error" border="0"></a>
  14. R

    Thisworkbook property

    In the below lines the first 6 and the 11th work, but lines 7, 8, 9 and 10 don't work Do you have to use Sheets when using ThisWorkbook [myrange] = "Yes" [myrange].Offset(0, 1) = "Yes" Sheets("Sheet1").[myrange].Offset(0, 2) = "Yes" Range("myrange").Offset(1, 1) = "Yes"...
  15. J

    Compile Error - Unusual

    Hi all. I recently made an excel VBA project which then turned out to be a huge application. This application is being saved in a network shared folder where multiple users are able to access the file (only one at a time though). So, this application runs smoothly thus far on multiple machine...
  16. J

    Option Explicit causing compile error

    This code is periodically crashing excel when a user doesn't save a workbook. Sub FillLog(uName) Option Explicit uName = Environ("UserName") Sheets("Values").Cells(10, 43) = uName End Sub I ran the "Compile VBA Project" from the debug menu and it gave me an error or "invalid inside...
  17. K

    Select Case Issue

    In general, is/are there condition(s) in which Excel VBA will not recognize a "Select Case" statement? My current project is failing to compile (Error: Case without Select Case)) even though "Select Case" is obviously in the code just above the first case. (It is not within another Select Case...
  18. J

    Compile List and Count

    Aloha - I am trying to compile a list from a column and count the number of times the variable appears. In Column D I would like Excel to look for a specialty when it comes across a new name put in under the specialty box, column F. Then I would like to display the number of times the variable...
  19. K

    Excel error message when trying to add an Add-In

    This is the error message: "Compile error in hidden module: mMenuAdd"
  20. 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?

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