case

  1. zendog1960

    1004 error

    Hello folks, I am getting a "run time error 1004 application defined or object defined" error. I am adding the code below. I would appreciate if someone could look the code over and let me know if they can find out why I am getting this. First things first: in the Range D2, I have that cell...
  2. N

    Change Label color based on caption in Label with VBA code

    Hello, I have a userform with a label "txtRest" using the following code to get the total amount. (this code is in subroutine "txtTotal_Change") Me.txtRest = (IIf(Format(Me.txtTotal, "#,##0") = "", 0, (Format(Me.txtTotal, "#,##0"))) + 0) - (IIf(Format(Me.txtPaid, "#,##0") = "", 0...
  3. kelly mort

    Get array index for selected item

    Sub TestIndex() Dim arr, List$, i% List = "10,12,14,16,18" arr = Split(List, ",") For i = 10 To 18 Step 2 Select Case i Case LBound(arr) To UBound(arr) MsgBox arr 'Here, I want msgbox show say 0 to 4 End Select Next i End Sub So when...
  4. R

    Exit main macro if frmMsgBox equals no, else run main macro

    Hello! :) I have a large main macro. I would like for the very first thing it does is to call a custom msg box that will ask the user whether or not they wish to exit the macro, or if they wish to continue. If they wish to exit, I need to exit out of the custom msgbox sub AND also out of the...
  5. P

    Case "Question"

    Good Evening, I have a Case code question. In having: Case "Tab Name" Now the represents just that, the name at the bottom of the tab of which is the actual name of the worksheet. Is there anyway to specify this in a generic fashion? For example...
  6. BlakeSkate

    Non Case Sensitive Dictionary

    So i have a dictionary of colors some vendors like to write in all caps, some like to write in proper, some like to write in lowercase, some have their own thing goin on? anyways my statement here ary2(i, 4) = dicFINISH.Item(ary2(i, 4)) takes their color description and replaces it with a...
  7. M

    Website Scrapping in excel

    I need query to scrape following website link data into excel spread sheet https://urlzs.com/11Wc9 There are 18,839 properties results appearing on above link. Fields I am looking to be exported into excel are price, location, telephone, square meters and the link of that property. 1st case...
  8. R

    error when saving file in xls and pdf format

    Dear Guys Hi i am having the following problem with below vba codes when saving file to xls and pdf Error Run time Error 1004. Document not saved. The document may be open , or an error may have been encountered when saving. My vba codes are as follows :- Sub searches() Range("b2") =...
  9. Trevor3007

    find case in a certain cell

    hi, I use the following code Dim Changed As Range, Cell As Range Dim Clr As Long Set Changed = Intersect(Target, Range("m2:k300")) If Not Changed Is Nothing Then For Each Cell In Changed Select Case LCase(Cell.Value) Case "win10": Clr = 35 Case "no"...
  10. P

    Cell change by selection Error

    I have the following code that won't work. Ideally, I would like for any cell in column Q in the chart to toggle values from "" to "P" upon selection. Also I need Range("L5") to toggle 5 different values upon selection Please see code below. Private Sub Worksheet_SelectionChange(ByVal Target...
  11. John.McLaughlin

    I want to control the order of cell selection during data entry.

    I have a simple worksheet to enter customer Info. I want to control the order of cell selection and reduce the users need to Tab Right. User enters First Name, press enter VBA to bounce right and enter Last Name (instead of Tab Right) After Last Name is entered, press enter VBA to drop down...
  12. S

    VBA auto refresh cell value in userform - textbox.

    Hello, I created a form whose value could be edited via userform. in same userform, there is a cell that shows the result of that calculation. how to make it dynamic? 'Diğer değişkenler için burayı planladımPrivate Sub tbBINR_Change() Select Case tbBINR Case "<1,7" X = 1...
  13. kweaver

    General style question

    Wouldn't it be advisable to avoid using a lower case "L" for, say, a loop when it (l) looks too much like the number 1?
  14. C

    Conditionally coloring textbox - Excel VBA

    Dear MrExcel, I need to coloring textbox based on its value. I've tried to write the code below, but it wont works. If value = 0% then backcolor is Red If value > 0 and <= 50% then backcolor is Yellow Else backcolor = Green Can somebody help me? Private Sub Train3_Progress_Change()...
  15. NewOrderFac33

    Search and Replace custom function issue

    Good morning, I'm trying to write a function to search and replace, thus: Set AnimalColumn = Sheets("Database").Range("Col_AnimalType") ReplaceWithSpecies AnimalColumn Function ReplaceWithSpecies(RangeToProcess As Range) With RangeToProcess Select Case UCase(.Formula)...
  16. N

    How to find all combinations within a constraint

    I am after some code/advice for Access. I have a list of Order Numbers(Unique) and what cubic metres that each are, I also have a cost benefit per Order. I would like to run some code to be able to find every combination of Orders but within a given constraint of Cubic size (65Cube) to find the...
  17. R

    Calculating difference between opened date/time and closed date/time and excluding weekends, holidays and off business hours

    I have an excel sheet that lists the opened and closed date/time for a ticket. Our SLA’s are based upon created date/time during the coverage hours – 8am ET until 5pm ET (weekends and national holiday’s, both US and India, excluded). If ticket is received prior to 8am ET or after 5pm ET, the...
  18. I

    Edit code from specific cell to a range of cells, run time erro type mismatch

    Evening, I currently have the working code supplied below in use, This is how it works. I complete each cell with values in row 7 & i see cell B7 10th character change to red & also the value in cell E7 show in red. The red part of the code is applied from values entered into the cell B7 BUT i...
  19. B

    method value of object metaproperty failed

    I am running a macro that saves a certain cell data to a property in sharepoint metadata. It works great. But, there's always a but, there are times that the string has a comma, then an intentional space at the end. When that is the case, I receive the following error: "method value of object...
  20. N

    Userforms with multiple case

    I have a userform with several text boxes. Two are tied to select case statements. What I'm after is if the defect is "sheet metal (bent)" and the reason is "bent to long" I need it to put 01001 into a cell. That part is simple enough. The problem I have is that with each defect there are...

Some videos you may like

This Week's Hot Topics

Top