compile

  1. S

    HELP: Compile Sheets Into ONE Tab

    VBA: Compile 5 out of 10 sheets into 1 Hello! I have made a macro to basically take 5 data sources and order them into new order by headers. Now I have 5 sheets into a workbook of 10 that is set in the same order with same headers. Is there a macro out here that would compile the 5 sheets...
  2. M

    Using variables in a Range

    Hi I am trying to write a formula in a range. I am suing the code below to define my range: range("b" & m + n + 11&":k" &m+n+11) m, n are defined as integers VBA doesn't seem to like it. It highlights ":k" and comes back with the message: "Compile error: Expected: list separator or )" Can...
  3. B

    Compile error

    Hi all, I keep getting compile error "End With without With" with: Private Sub CommandButton1_Click() With ActiveSheet If OptionButton1.Value = True Then .PageSetup.PrintArea = "$a$1:$z$55" .PageSetup.Orientation = xlLandscape .PageSetup.LeftMargin =...
  4. B

    Compile Error: Variable Not Defined

    Hey there! I am trying to get some code to work and had a friend help me try to clean it up. It worked when he ran through it, but now I am getting a Compile Error. I have made the line where the error occurs bold. The string of code is as follows: I would also like to add that I renamed...
  5. N

    Compile Error: Invalid qualifier

    My code is : Sub Calculating() Dim header As String With header.Range("A1") = "Name" .Cells(1, "B") = "Class" .Cells(1, "C") = "Subject" .Cells(1, "D") = Range("d1") = "Marks Secured" The above code is causing to throw error as...
  6. 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)...
  7. G

    Compile error notice

    I have a spreadsheet with lots of VBA in it that I've used for a number of years. Recently it produces an error message when I open it - Compile error- Automation error. When I ok it, the VBA editor opens with this line highlighted in blue: "Dim workbook1 as workbook" (Dim is not highlighted)...
  8. A

    compile error: argument not optional

    Hi guys, i may need some help here. I'm new to VBA excel and want to save the data directly into MYSQL database. But i have encounter some compile error with argument not optional. Here's my below codes: Sub dbConnect() <--- error from here Dim conn As New ADODB.Connection Dim iRow As...
  9. T

    Compile Error: Expected List Separator or ) when trying to get a range

    This is giving me an error Worksheets("Sheet1").Range("A" & i&":B" & i).Cut Compile Error: Expected List Separator or ) please help
  10. M

    Ambiguous sub name

    Hi I created a Sub name but Excel stopped the code from executed and said "Compile error: ambiguous name detected: SavingANewlyCreatedWorkbook" The sub name is below - any ideas why? Sub SavingANewlyCreatedWorkbook()
  11. L

    SUMIFS in VBA

    Can anyone explainto me what is wrong with this Formula. =SUMIFS(F760:F841,B760:B841,"A",I760:I841,"B",J760:J841,"C",K760:K841,"D") On a worksheet it works without issue. When I try it in VBA it gives the following error. Compile Error: Expected: List Separator or). The colon between F760 and...
  12. S

    Compile Error: Sub or Function not Defined - GoTo

    Greetings, This is what I'm working with... If Range(Cells(k, b)) <> "" Then GoTo First Else GoTo Second First Set h = Range(Cells(k, k.End(xlToRight))) k = k - 1 End If Loop Second h.Copy...
  13. andrewb90

    Compile Error on startup

    Hello all, When I open my workbook, my opening code doesn't run and I get an error stating: "Compile error in hidden module: ThisWorkbook..." Any ideas what could be causing this?
  14. D

    VBA Code for a print button

    I have setting up a siple print button where on initiation the macro prints a range of cells on a speciic worksheet in a workbook. But I have been getting a compile error. I just cannot see whats wrong...any suggestions? Sub Print_Invoice() Sheets("PreSchoolInvoice").PrintOut...
  15. R

    Creating summary file from multiple workbooks created on specific day

    Greetings all, I have an analytical piece of equipment that exports data for each sample analyzed into a separate .txt file. I would like to compile all of the data from analyses performed on one day into one summary workbook. All of the exports are in the same format but the location of the...
  16. D

    Compile Error

    I'm new to VBA in excel, I'm getting a compile error with the following code: Range("M1, N1, O1, Q1, S1, T1, U1, V1, W1, X1, Z1, AB1, AC1, AD1, AE1, AF1, AG1, AI1, AK1, _ AL1, AM1, AN1, AO1, AP1, AR1, AT1, AU1, AV1, AW1, AX1, AY1, BA1, BC1, BD1, BE1, BF1, _ BG1, BH1, BJ1, BL1, BM1, BN1, BO1...
  17. 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...
  18. D

    Compile Error: Expected: Expression when creating Outlook and building email line by line

    Compile Error: Expected: Expression when creating Outlook and building email line by line Trying to have a standard body/header, and insert line items based on excel values (If 1 include line A, if 2, include line B, etc.) ANY feedback or advice would be greatly appreciated. aEmail.Body = "Hi...
  19. B

    Lookup value in table if header date falls within this range

    I need to compile a list of item qtys across a weekly grid for reporting purposes. My original sheet is a list with duplicates. How do I arrive at the conclusion in the second table using formulas? Right now I'm doing this manually. <tbody> ITEM QTY SHIPPED IN-HOUSE DATE (OR EST) WEEK...
  20. andrewb90

    Compile Error

    Hello all, I get a "Compile Error - Wrong number of arguments or invalid property assignments" every time I try to run my code. I've been changing this little section, and I feel like I must have missed something little that is causing my error. Else Gmail "email@gmail.com", "password", ""...

Some videos you may like

This Week's Hot Topics

  • populate from drop list with multiple tables
    Hi All, i have a drop list that displays data, what i want is when i select one of those from the list to populate text from different tables on...
  • Find list of words from sheet2 in sheet1 before a comma and extract text vba
    Hi Friends, Trying to find the solution on my task. But did not find suitable one to the need. Here is my query and sample file with details...
  • Dynamic Formula entry - VBA code sought
    Hello, really hope one of you experts can help with this - i've spent hours on this and getting no-where. .I have a set of data (more rows than...
  • Listbox Header
    Have a named range called "AccidentsHeader" Within my code I have: [CODE]Private Sub CommandButton1_Click() ListBox1.RowSource =...
  • Complex Heat Map using conditional formatting
    Good day excel world. I have a concern. Below link have a list of countries that carries each country unique data. [URL...
  • Conditional formatting
    Hi good morning, hope you can help me please, I have cells P4:P54 and if this cell is equal to 1 then i want row O to say "Fully Utilised" and to...
Top