compile

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

    Code works in debug mode but fails to run in compile mode

    Hi all I am writing a VBA code to copy charts from Excel to Powerpoint. The code is running fine in debug mode, however, gives an error in compile mode. Can anyone please help? Thanks in advance. MBSheet.Activate MBSheet.ChartObjects("Chart 1").Chart.ChartArea.Copy mySlide.Select With...
  4. J

    VBA compile error

    Get an error message: compile error: method or data member not found at each of the two lines starting with selection Sub Accrual_Provision() Sheets("backing").Activate ActiveCell.FormulaR1C1 = "Accrual October" ActiveCell.FormulaR1C1 = "=+R[-8]C[-1]/9*10" Range("F41").Select...
  5. V

    Compile Error- Sub or Function not defined

    Not sure what is going wrong with the following code, I am getting the Compile Error- Sub or Function not defined. I am trying to delete all rows which dont have Cell value Ed. Sub Macro1() Dim r As Long Dim FRow As Long Dim LRow As Long FRow = 2 LRow = 1000 For r = LRow To FRow Step -1...
  6. P

    Workbook_BeforeClose compile error: Variable not defined help

    What this code is suppose to do is look to see if any of the worksheet names equals Exhibit "I" or "page 2". If they do exist then before closing the workbook don't save it and then close the workbook. Actual First Worksheet Name is Exhibit "I" and the second worksheet name is page 2...
  7. R

    Newbie Access vs Excel question

    I have a client that has an excel report that hes wants to make easier to compile. He uses data from multiple diverse reports and uses at least 6 separate pivot tables and uses the resulting columns to compile this one report. I've been tasked with this job quicker and easier. My excel...
  8. C

    How to use AddressOf in VBA

    I have a timer script from the web that uses the AddressOf MySub as the callback. Apparently it worked for the person who wrote it. However, it fails to compile at least under Excel 2013. Is this keyword and functionality still valid in VBA? In 64bit? I can post the entire timer script if...
  9. P

    Compile Error on Sorting

    I'm trying to insert a line of code at the end of my macro that will sort the list alphabetically. I keep getting this compile error and it points to the word Key1 in my line of code saying that it expects the end of a statement With Sheets("Doc Checklist").Range("C2:C500").Sort...
  10. G

    'Selection' Compile Error

    Hi All, having a problem with Excel 2016, code that had always worked has stopped working! When it is run I get an error. "Compile error: Expected Function or variable" and highlighted is "Selection" in the code. I am trying to write new code to do other jobs and anything with "Selection."...
  11. I

    Compile error "Subscript out of range" in simple set statement

    I'm obviously missing a fundamental concept. I have reduced my problem down to a few lines of code, and still can't solve it. Sub tstSbScrptRng() Dim wkBk As Workbook Dim sPath As String Dim sFile As String sPath = "C:\Users\ibud0\Documents\" sFile = "Garbage.xlsx"...
  12. P

    Compile error help

    Private Sub cmbSDPFLine_Enter() Dim i As Long cmbSDPFLine.Clear cmbPrdCde.Enabled = False cmbPrdCde.Clear txtbxPrdctNm.Text = "" WS_Count = ActiveWorkbook.Worksheets.Count For i = 4 To WS_Count cmbSDPFLine.AddItem Sheets(i).Name Next End Sub...
  13. Rymare

    VBA: Compile multiple workbooks to one sheet, unknown error

    I have some code that a lovely contributor on here was kind enough to make for me, and it takes a list of excel paths (which can be a long list or short), opens them, is supposed to copy all the rows that have data (because some will have more data than others) and then add them to the bottom of...
  14. P

    Compile error in email coding

    Hi, good morning. I have the code below which is just a small part of alot of code for an email, i am trying to add the part in bold to the code infront but i keep on getting a compile error, please can you help? any help is greatly appreciated. "<p>" & Me.TextBox3.Value & "</p>" & "<p>" &...
  15. H

    VBA - How to Clear ONLY bottom border of Rows in a range?

    I can set a border with: Dim rnge3 as Range Dim rowstart as Integer, rowend as Integer set rnge3 = Worksheets(3).Range("A" & rowstart & ":AU" & rowend) With rnge3.Borders(xlEdgeBottom) .LineStyle = xlContinuous .Weight = xlMedium .ColorIndex = 3 End With But when I want to clear that...
  16. B

    Compile one list from multiple columns

    Hello, Is there a way to compile a single list in a single column from data that I get from another search? <colgroup><col><col><col span="2"><col><col span="7"></colgroup><tbody> Unit Number 255358 255358 272833 255370 272840 782673 271775 769525 PEC1783 271004 271004 769524 255379...
  17. E

    Using SUMIF with specific assigned values

    Hi! I'm trying to compile a total time for a job by referencing the name of the job's component. I'd like to be able to assign a value of 1 minute to "filing", 2 minutes to "retrieval", 1 minute to "processing", etc. and have the time compile based upon the job entered in the column. I...
  18. K

    count files in folder

    Sub Demo() Call CountfilesInFolder("C:\Users\kamal.j.kumar\Documents\CDP", "*.xls*") End Sub Hi, In the above macro, I get the following compile error: sub or function not defined. Why ?
  19. M

    Loop through sheets and add to array to select

    I have a number of worksheets and want to select all other than 2 specific sheet. I'm struggling to compile the code to basically say 'Select all sheets other then Sheet1 and Sheet2' TIA
  20. S

    Compile Error While Setting Range for Chart Source Data

    Greetings, I am receiving a compile error expected: = message after trying to set the source data range for an xyscatter chart type on the line below. I would like to use data ranges from another workbook "COMM_COMBINED.xls" and a worksheet by the worksheet variable name zz...

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