ans

  1. D

    Code not through an error when deleting a row and the row is empty

    I have a button that deletes a row at a time but when it gets down to nothing left, as in, nothing in the last row, what do I need to add to this code to make it stop displaying an error of "no cells found" when it is trying to delete the last row and it has nothing in it. How do I stop that...
  2. H

    Adding a prompt box before executing a macro

    Hi everyone, I have a macro that I know works that would copy data from a range on one sheet within the workbook and paste the data as values in the desired location. Macro: Sheets("Master_Listing").Select Range("B2:B349").Select Selection.Copy Sheets("Busy Season Tracker").Select...
  3. G

    VB code help please

    How do I restructure this part of the code, to put todays year, month, and date, before this part of the code? Private Sub Workbook_Open() Dim Ans As String Ans = MsgBox("Update Invoice Number (???)", vbYesNo + vbInformation) If Ans = vbYes Then Example: 2018121773 ...
  4. M

    If I print, It will not save correctly. HELP!!!

    <!--[if gte mso 9]><xml> <o:OfficeDocumentSettings> <o:AllowPNG/> </o:OfficeDocumentSettings> </xml><![endif]--> Not exactly sure how or why this is going on. We switched out our computer and upgraded Office 2010 with Office Professional Plus 2016. Now our training form isn't working...
  5. M

    Data Layout / Pivot Table Question

    Hello! I've been given a table containing information - no numbers - so this isn't a calculation questions. It is more of a data display question. The spreadsheet originated from an online form where people were asked to pick their location, their name, and about 25 optional questions. Each row...
  6. D

    Force user to enter a valid date

    Hi, I have the below code. Is there a way to amend such that the user is forced to enter a valid date in the dd/mm/yyyy format (With the / included in between); Dim Ans As Date Ans = InputBox("Enter date in format dd/mm/yyyy") Range("A1").Value = Ans Thanks
  7. I

    Command button code like userform.show

    Evening. I am using the code below. After i have been told that the item exists or does not exist i click on OK and the message box closes. I then need to click again on the command button3 to show me the box & type in another number. What i would like is to be able to apply something like...
  8. S

    Vlookup and sum from multiple sheet

    Hi what is wrong in the UDF Function MLookup(LV As String, Rng As Range, Col As Varient, ShName As Variant) As Integer Dim Ans As Integer For Each Cl In ShName Ans = Ans + Evaluate("=SUM(VLOOKUP(" & LV & "," & Cl & "!" & Rng & "," & Col & ",0))") Next Cl MLookup = Ans End Function...
  9. P

    filter by name in combobox

    Hi i have a userform1 which has a combobox1 where i highlight a list of names ready to send on an email, when selecting a name from the combobox i want it to 'on click' to automatically update the work issue sheet with the name selected in the combobox, can you help please? this is the code i...
  10. D

    Clear the contents of last row

    I have a table and buttons to add and delete rows. It won't delete the last row of the table when there is just one row left and this is good as if it did, it would delete all the formulas from it. However, I do want to clear it of contents when it gets down to deleting the last row, but keep...
  11. D

    Userform - All fields Manadatory and must me Completed yet "Unload Me" circumvents process

    Hello Need help on this one. I have really tried to search and figure this issue out before posting... I have a userform called DigitalSignatureSM that is used to digitally sign a form. All fields in the userform (i.e. dropdown combo boxes) are required to be filled and will highlight in...
  12. H

    VBA code to copy data from specific columns in target row instead of entire row

    Hi Excel Wizards, Right now once a drop down value is selected (ans), a time stamp is added to H and the entire row is copied to another sheet (ans) corresponding with the drop down. Here is a shorten version of what I have, with one example using the value TEST. Private Sub...
  13. D

    Macro not working

    **CORRECTION** The problems listed below only happens for certain users. Maybe different versions of excel? I have two macros that are supposed to run upon clicking a CommandButton. First, there are several cells that either contain "YES" or "NO" If the cell equals "YES", the corresponding...
  14. S

    enter vba code

    Sub Clear_Sheet() Application.ScreenUpdating = False Dim Msg As String, Ans As Variant Msg = "Are you sure you want to clear all data in 'Data Sheet'" Ans = MsgBox(Msg, vbYesNo) Select Case Ans Case vbYes Sheets("Data...
  15. H

    VBA code not pasting data correctly, keeps overwriting data in target sheet

    Hi Excel Wizards, The function of this code is to copy data from one sheet to another using a drop down and message box, also adding a timestamp. Unfortunately the destination is targeting row 2, not the last blank row, and overwriting any data in row 2 of the destination sheet when the copy is...
  16. L

    MessageBox opens multiple times

    Hello everyone! I have a MessageBox in my application that asks whether the user wants to add a new product to the order or not. If I press 'No', it closes. When I press 'Yes', it does what it's supposed to do, lets me add another product, and so on. The problem is that once I press no, the...
  17. H

    Coding error I cant find code runs but no results

    hello, I have a spreadsheet that is basically a roster that staff can choose to print just their own shifts. The code below runs with no errors popping up but there is always no results shown. The input is via userform list box with command button. (I have not used user forms before) It...
  18. B

    Copy Formulas in New Column

    Sub Insert_Column() Dim ans As Long ans = InputBox("Insert into Column") Columns(ans).Insert Shift:=xlToRight MsgBox "You have Inserted column " & ans End Sub Sub Delete_Column() Dim ans As Long ans = InputBox("Delete Column") Columns(ans).Delete MsgBox "You have Deleted column " & ans End Sub...
  19. rjbinney

    VBA to Turn OFF 'AutoSave'

    I have a pretty hefty file with a macro that does a couple of "Save As" (for backup, mobile-friendly, etc.). The final step of the macro is to open up the original file, which is stored in OneDrive. In the last few weeks, when it opens the original file, it flips the AutoSave option to ON...
  20. M

    Search Function

    Hi Im struggling to understand why this doesn't work, could someone take a look and advise please On Error GoTo error Dim SearchString As String Dim Lastrow As Long Dim ans As String Dim SearchRange As Range Dim Lastrowa As Long Const prefix As String = "COLL" ans = TextBox1.Value...

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