compile

  1. 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...
  2. 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))...
  3. ChuckDrago

    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...
  4. 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...
  5. 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...
  6. 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 =...
  7. 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()...
  8. 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...
  9. 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...
  10. 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".
  11. 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="https://ibb.co/hmRVfHr"><img src="https://i.ibb.co/ZM6xmKv/Compile-error.png" alt="Compile-error" border="0"></a> https://ibb.co/hmRVfHr
  12. 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"...
  13. 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...
  14. 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...
  15. 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...
  16. 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...
  17. K

    Excel error message when trying to add an Add-In

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

    Compile Error trying to open password protected file

    I am working on windows 10, Excel 2016. The file i was creating is to be a shared file, which will have data input by numerous peope with the data then being transferred into anothe file for another department to review. The code written closed the 2nd file when the data was transferred, and i...
  20. B

    Compile Error

    I am having a problem resolving a compile error with this line. I find many of the same issues however unable to resolve. Any suggestions what this issue is. Thanks guys range("F5").FormulaR1C1 = "=TRIM(RIGHT(C5,LEN(C10)-SEARCH(" ",C5))" & " "&LEFT(C5,FIND(" ",C5))""

Some videos you may like

This Week's Hot Topics

  • Problem with Radio Button's format control
    I am creating an employee evaluation template (a sample is below) Column A is the category Column B, C D, E and F will be ratings (unacceptable...
  • Last Display on userform to a Listbox
    [CODE=vba] lstdisplay.ColumnCount = 15 lstdisplay.RowSource = "A1:O600000" [/CODE] So when i do this it Displays everything on the sheet i am...
  • Rename and move files to a new location
    Dear all, I have an excel file with the following information. The actual file name is at column A but i want to rename it using the following...
  • Help with True/False Formula
    Hello! Am stumped how to fix this formula, in which my result returns 'True', but it should return False. =IF(AG2=True...
  • Clear extra characters from a provided range of cells
    Dear All, I have following code which gives me desired output to remove extra characters from a provided range. But it takes too much time when...
  • Help with Current and highest streaks
    Hi there, I've just joined the forum and this is my first post. I've already spent quite a bit of time searching the net and this forum for a...
Top