compile error

  1. RJSIGKITS

    How to fix Compile Error message?

    Hi Guys. I have just bought a new computer, and have been transferring my files, but trying to use my main Excel Document, and it comes up with: "Compile Error in Hidden Module: Sheet 22" My sheet number 22 is the sheet with all of my data Validation lists on. Can anybody please tell me what...
  2. S

    Input Box not working in VBA

    hi Guys, I am trying to play with vbs again, and what I am trying to achieve is that a pop up box appears when I run the macro, the user enters some text (a name or something) and then the macro fills this name down the sheet. I have the line below it (commented out below) working fine, but I...
  3. B

    Compile error (type mismatch)

    Hi Guys! I'm using the looping condition for extraction of years. And heres my code. I having a trouble when i run it. Suggestion or clarification please. Thankss! Sub GetLoans() Dim i As String Dim strYrFlag As String Range("E1").Select For i = 1 To 4876 Range("H1:J1") As Range If...
  4. J

    Sub or Function not defined

    Hello again. I am running into a compile error saying “Sub or Function Not Defined” for the following: LastRowInOneColumn Could you please help me out! Here is my code: Range(strCopyRange).Select Selection.Copy currentWB.Activate Sheets(strWhereToCopy).Select LastRow =...
  5. B

    Trouble with Excel 2010/ MS VB for Applications - Compile Error: User-defined type not defined

    Excel 2010, Win7. I'm trying to use a Re-Login macro button on a spreadsheet. VB throws the Compile Error: User-defined type not defined. Clicking ok on the error highlights the following code: Public objHTTP As LawSSOHttp2.SSOHttp. The code in this General Declarations is: Option Explicit...
  6. W

    vba compile error

    Hello I have confronted an vba compile error, while making an userform. my code is the following Private Sub CommandButton1_Click() name.Value = "" you.Value = "" destination.Value = "" region.Value = "" country.Value = "" month.Value = "" year.Value = "" qa.Value = False qn.Value = False...
  7. V

    Merge Workbook in VBA

    I am attempting to merge multiple files from a folder into one workbook. So far I have been able to merge the data, but when I attempt to add the file name in last column of the the results I am getting an error message. I am really new to VBA and any help is greatly appreciated. The error...
  8. Prevost

    Methods to deal with compile error: else without if

    Hi There, I am having trouble with finding what is actually wrong with my code in regards to a specific ELSE condition. It highlights the ELSE that is apparently not related to an IF statement. Unfortunately, I am the only one here that has a basic (maybe even very basic because I can't get...
  9. L

    Compile Error in VBA

    I've been looking through a bunch of searches and other things an can't seem to find anything to help get rid of this error message. I started using VBA for the first time two days ago and have been having a blast, but this one baffles me. VBA Compile error: Variable not defined My code is...
  10. D

    Sub or Function not Defined

    Hello Everyone, This is my first post hope it will fit in with the guidelines... I am getting this "Sub or Function not Defined" Compile time error. I don't understand, I give up. What realy bothers me here is that the below macro seems to work fine on my home computer with Excel 2013 but at...
  11. dmars

    User defined type question

    This is my first attempt to make an LIFO stack in Excel VBA, and the problem I'm running into is that Excel doesn't like my user defined type as a parameter I pass to a function. I get the compiler error: "Only public user defined types defined in public object modules can be used as...
  12. Z

    Sub or function not defined

    The code below automatically calls AddHeaderHours when something is entered into cell G30, this code does work (coded to the worksheet). '--------------------------------------------------------------------- Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address = "$G$30"...
  13. B

    compile error - project or library not found:

    I have this code (below) that runs great on two of three PC's but the 3rd PC keeps getting a "compile error - project or library not found:". I've done a little research and most results came up referencing with VBIDE. Problem is I have no idea where or what that is yet. Can someone help me...
  14. J

    Project/library userform macro error!

    Not sure what title to put on this, because the macro I was using was working just fine, until all of a sudden it wasn't. Go figure. Basically I have a workbook with several pages of spreadsheets. The first page is titled "Reporting", the rest are titled by Month and Year ("August 2013"). I also...
  15. E

    How to debug code with the immediate window

    Hello fellow Excel friends, A co-worker of mine was helping me out with a piece of code and used the immediate window to quickly print out properties and evaluations of expressions without needing to use a msgbox. I am trying to figure out how to do just that. From what I know, all you are...
  16. D

    Next Without For When Many If Statements

    Hi, I am looping through the different sheets in a workbook and filtering by different criteria depending on the value of two different strings. There are 36 possible combinations of these string values so I need many If..ElseIf statements. However, when I have the full code I get an error...
  17. H

    Compile Error: Sub or Function is not defined.

    Hi all, I am beginner in Excel VBA. Before posting this thread I have researched many similar posts but none of the suggestions solved my problem. I am getting compile error. The solver is checked in the reference. The workbook is saved under a new name. Still getting the error for the...
  18. D

    Compile Error: Object required that I can't fix

    I am having trouble with the following code where I get a Compile Error: Object required error on the first set command. I'm obviously missing something right in front of me, but I can't spot it. Why doesn't it like hHeader? Thanks for looking at this. [code] Sub delHead() Dim sh As...
  19. U

    Compile error: ByRef argument type mismatch in function call

    I have had this problem before but never in something so simple. In this case it is looking at the variable DataRowCount that is defined as an Integer in the function and assigned the value of 1 in the subroutine. In the subroutine I get the Compile error and it highlights the variable. Can...
  20. U

    Compile error: ByRef argument type mismatch

    I have had this problem before but never in something so simple. In this case it is looking at the variable DataRowCount that is defined as an Integer in the function and assigned the value of 1 in the subroutine. In the subroutine I get the Compile error and it highlights the variable. Can...

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