msgbox

  1. 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...
  2. 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 =...
  3. 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...
  4. 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.
  5. 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...
  6. 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...
  7. 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...
  8. 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
  9. 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...
  10. 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...
  11. 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...
  12. 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...
  13. 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...
  14. N

    MsgBox if TextBox is not empty

    Hello, I have a userform with some textboxes and command buttons (one of them, "cmdClose") I need to code the following scenario If I click "cmdClose" and the textamount is greater than Zero, pop up msgbox with vbYesNo, if I click Yes, close the userform, else, do nothing And if txtamount is...
  15. Z

    arrays and totalling an element

    here is a snip it of code for totalling time numbers of items pulled from a listbox into an array, then another array holding data is search for a match then the time number pulled from dataarraylist postion 3 column. msgbox total should show say 0:33 BUT shows...
  16. T

    VBA: MsgBox Warning if row is hidden

    Hi all I'm new here and kinda of new to VBA, but trying to learn. I have a bit of a tough one (for me at least). I am trying to write a code that can do the following. Whenever a row is hidden manually if the row contains a value greater or smaller than zero, and not text string in...
  17. rjplante

    Check workbook name for specific word

    I am looking for a way to see if the workbook name contains the word "Template". If so, I want the macro to prompt the user to save the file. I have the code listed below, but it does not seem to give the correct response. How do I get this to work? If ThisWorkbook.Name = "*Template*" Then...
  18. C

    MsgBox Pops Up Multiple times if conditions are met

    Hey everyone, I am having some issues with a message box popping up 3 times for each scenario in the code below. I tried using Boolean values as explained in similar posts, but that just made the problem worse. Basically, there are two cells in question. I'd like for one message ("A") to pop up...
  19. F

    Inputbox capture OK and Cancel without any data entered

    I'm missing something here. I want the user to enter a number. If they don't enter a number, but instead they enter text, they get "Number is not valid" and the value entered is highlighted for the user to try again. If they select cancel they would get "You did not enter a number. Please...
  20. D

    Msgbox with range output

    Hello, I would like to know if anyone is able to help with some msgbox issue. Idea is to have a list of items be displayed in msgbox. I barely use msgbox and i found some info and played a bit and managed to get this code, but not sure how to edit it in a way that the range is from fix start...

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