msgbox

  1. 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...
  2. 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...
  3. 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...
  4. 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...
  5. 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...
  6. 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...
  7. 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...
  8. 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...
  9. 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 =...
  10. 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...
  11. 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.
  12. 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...
  13. 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...
  14. 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...
  15. 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
  16. 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...
  17. 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...
  18. 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...
  19. L

    string manipulation vba

    Hi I wrote a code to ask user to enter first and last name and then the code will msgbox fullname. Now I want to improve the code. I want to msgbox the first letter for the first name then last name. So later I can msgbox the email address. For example, if user enter John Smith I want to...
  20. 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...

Some videos you may like

This Week's Hot Topics

  • Problem with Radio Button's format control
    I am creating an employee evaluation template (a sample is below) Column A is the category Column B, C D, E and F will be ratings (unacceptable...
  • Last Display on userform to a Listbox
    [CODE=vba] lstdisplay.ColumnCount = 15 lstdisplay.RowSource = "A1:O600000" [/CODE] So when i do this it Displays everything on the sheet i am...
  • Rename and move files to a new location
    Dear all, I have an excel file with the following information. The actual file name is at column A but i want to rename it using the following...
  • Help with True/False Formula
    Hello! Am stumped how to fix this formula, in which my result returns 'True', but it should return False. =IF(AG2=True...
  • Clear extra characters from a provided range of cells
    Dear All, I have following code which gives me desired output to remove extra characters from a provided range. But it takes too much time when...
  • Help with Current and highest streaks
    Hi there, I've just joined the forum and this is my first post. I've already spent quite a bit of time searching the net and this forum for a...
Top