1. S

    VBA: Msgbox to alert that there are no negative values in the final col for validation

    Hi, I am relatively new to VBA so still struggling to fully understand the syntax. I have been working on an automation macro & I am quite close to completion I just have a step that is appearing more difficult than I would've thought. I am trying to provide a pop-up that alerts the user...
  2. B

    Create Custom Msgbox VBA Multiple Criteria

    Hi Everyone, What if I want multiple msgboxs per each sheet? I realize I can have two different outcomes to a specific scenario. Is there a way to use IF, THEN? For instance, if COLUMN L and COLUMN K equaled ONE then I would want a message to say "Burris article, check sourcing", but if COLUMN...
  3. J

    Adding msgbox to code

    Hi, Can anyone help, i am trying to get a msgbox to popup when no id is found. I have a sheet called Info and in column G i have some names and in column H I have some id numbers. I have a userformwith two textboxes when i scan an id into textbox7 that then searches the sheet Info then...
  4. gheyman

    Yes/No Message Box

    I would like to add a pop-up Message box that happens in this code after the DoCmd.RunCommand acCmdSaveRecord. "Do you want to return to the TSL?" If Yes then then DoCmd.OpenForm "frm_NIS_TSL", acNormal, "", "", , acNormal If No then the DoCmd.GoToRecord , "", acNewRec command Any help is...
  5. T

    Checking fields null

    Private Sub Command228_Click() 'Save On Error GoTo Command228_Click_Err On Error Resume Next DoCmd.RunCommand acCmdSaveRecord If (MacroError <> 0) Then Beep MsgBox MacroError.Description, vbOKOnly, "" End If Command228_Click_Exit: Exit Sub...
  6. L

    range.interior.color - value

    Hi What is the maximum value that color can take? I wrote the code below. Can I say the min value is 0 which is the value of rgb(0,0,0) and max value is 16777215 which is the value of rgb(255,255,255) Can I say that? Thank you very much. Sub myrgb() MsgBox RGB(0, 0, 0) MsgBox RGB(255...
  7. K

    Can someone help me with my coding to return error box only one time and also to create msgbox as Critical?

    Hello, I am attempting to create an error message msgbox in an Excel workbook/worksheet. I have the coding to create the msgbox but if the error is on the worksheet multiple times, it shows the error multiple times. I have tried using alreadyprompted coding to stop this action but I'm having...
  8. I

    Slight edit to existing working code

    Hi, The code in use is shown below. This is how it works. I have a listbox with customers names. I select a name & when i press the DateTransferButton todays date then is entered into the cell for this customer at colomn G I believe at present if a value is in the G cell then i see a message...
  9. G

    Finding Multiple Shapes

    I can't find the 2nd or 3rd Shape I'm want to edit. It locates the 1st one, but not the 2nd or 3rd. I used "record macro" to select the shapes and get the name. Sub PleaseFind() ActiveSheet.Shapes("Rectangle 9").Select ActiveSheet.Shapes("Rectangle 5").Select ActiveSheet.Shapes("Rectangle...
  10. D

    VLookup not working in VBA

    Hello, I'm attempting to do a VLookup in a macro while using the Match function to dynamically determine which column to look in. I did some testing by sending values to a Msgbox to validate I am passing the correct values. Ex: MsgBox "Match Value is : " & Match1 <== the value was 13...
  11. kelly mort

    Get last folder vba

    When I remove the last slash from the path FullPath = ThisWorkBook.Path & "\MyFolder" It works fine to display "MyFolder". But when I place it back as below, it shows blank. How do I fix that? Because I need that last slash in my path. Thanks Sub GetLastFolder() FullPath =...
  12. L

    printing all workbooks names in one shot

    Hi The code below is to print each workbook's name. If I have 5 then it will msgbox these 5 files names. I want to improve this code so it can print all the name in one shot (not 5 msgboxs or whatever the number of the files). Is that possible? Thank you so much. Sub wb_names() 'to find...
  13. M

    Formula "TYPE" into Function for VBA

    Hi all, how can I "converting" this formula: Range("B2") = "=TYPE(RC[-1])" into VBA ? as: Msgbox Application.WorksheetFunction.Type("B2") ---> (but does not work!!!) Tia.
  14. I

    Msgbox loop & unable to close msgbox

    Hi, Can you advise please what ive missed in the code below. I run the code. I see the msg box with the oK button. Pressing OK just does nothing & im unable to close the msgbox. Option Explicit Private Sub DatabaseCustomerDuplicateSearch_Click() Dim Cell As Variant Dim Source As Range Set...
  15. spencer_time

    Active worksheet as variable broken

    Hello guys, I need help again. I have a snippit that works when the sheet is defined (sheet3) but doesn't work when I try to make a variable for the active sheet (ws). I get an error that says "object doesn't support this property or method" and when I press debug it highlights my variable ws...
  16. L

    select case is not working

    Hi Why when I enter 66 as a number, this code print "Else"? it does not go the first case? any idea why? I used F8 but again jump to the last case. Thank you very much. Sub test3() Dim x As Integer x = InputBox("enter number") Select Case x Case x > 50 MsgBox...
  17. I

    Custom MsgBox. Buttons

    Evening, I’m looking for a msgbox but with buttons as 1 & 2. Is there a way to do this without it being a userform. Thanks
  18. L

    Time vs Date - consistency issue in vba

    Hi I just wanted to know why excel is not consistent here. I wrote the code below. When I call Data() excel will remove () and keep Date only; However when I used Time(), excel will keep the () It is not big issue but curious why there is not consistency here. Sub mytest2() MsgBox Date...
  19. I

    only one code executes after i merged two codes together

    Morning, I have merged two codes together but the seocnd part of the code does not execute / run I press my PRINT 1 INVOICE BUTTON on my worksheet. The invoice is then printed. I see the msgbox CLEAR INVOICE AFTER PRINTING. I press the OK button but after the msgbox is closed then this is...
  20. I

    MsgBox yes / no advice

    Morning, I have the code below but would like some advise for a slight alteration please as i got lost with the yes / no part of it.. The code saves a screen shot in the form of a PDF file. The Yes / No box is where im stuck. Clicking No would just continue to save as normal Clicking Yes...

Some videos you may like

This Week's Hot Topics