private

  1. P

    copy and paste to last row

    Hi i have the code below where i want to copy the word in Cell A2 in Shee1 which is 'ETA' and paste this into cell A3 Sheet1 down to the .LastRow but the below is not working can you help please? Private Sub CommandButton4_Click() Dim Lastrow As Long...
  2. B

    Using common variables

    Hello all, I got 2 userforms; Productionreturns and QA returns. Both contain the same labels; lblGelcodeR and lblProductnameR. Both contain the label info; if you click on it a new form opens: Information The form Information contains the label lblGelCodeR and lblProductnameR. They should...
  3. P

    Textbox in userform not initialized when workbook opens

    Hi I want to display userform when workbook is opened by user. Userform have 4 Textbox that have to be updated from cells value in Thisworkbook. I started with Private Sub Workbook_Open() WelcomeToISC.Show End Sub and followed by Initialize code Private Sub Userform_Initialize()...
  4. S

    Determine Mouse Scroll Wheel Rotation in VBA for Excel (64-bit and 32-bit)

    Hi! I am having a hard time getting this code running properly. I have searched the net for many hours. I want a standard module that will detect if the mouse wheel is scrolled up or down. Essentially, I am trying to change how many rows get scrolled at a time. Here is the code I have...
  5. S

    ComboBox: Searching its Original Index No. Value after value searched

    Hello Can ayone help me to find original Combobox index Value even after i search. ? in other words, when i search the list displays all the values, but clicking on the searched item it displays its index values as as per searched values. What i want is when i search the value i want its...
  6. T

    Tick macro

    Hi Everyone, I have the macro below which I use to treat my own tick boxes in cells "a" = tick It works great except you have to click away before it will change again. I was woundering if there was a bettter way i could do this? Basickly I want a macro that gives me an "a" in the cell i click...
  7. G

    clearing a duplication from excel sheet

    I am trying to get the duplicated input removed. I have a input form that a user can input a new serial number, however if it is a duplicate I need the program to remove it. The code I am using is as follows: Public clr As Boolean Public eRow As Long Public dup As String Private Sub...
  8. G

    Select Previous Cell

    Hello, Have the following code which works except it highlights the entire area it posted the data after doing the macro instead of just staying where the cell originally was. How can I get it to stay on cell B2 after running this code? Private Sub Worksheet_SelectionChange(ByVal Target As...
  9. D

    Selecting an item in a listbox deselects another item

    Afternoon all, I've got a listbox in a userform with MultiSelect set to 1 (fmMultiSelectMulti), and ListStyle set to 1 (fmListStyleOption). All the entries are input programmatically, and certain options are "pre-selected" by the code prior to the user interacting with the element. In this...
  10. P

    How to call Workbook_BeforeClose Event when commandbutton is pressed

    Option Explicit Private Sub CommandButton1_Click() Workbook_BeforeClose End Sub Private Sub UserForm_Initialize() Me.Caption = "Print, Save and Close" With Me.Label1 .Caption = "Do you want to print, save and close the workbook named: " & """" & ActiveWorkbook.Name & """"...
  11. D

    UserForm with 5 Listboxes to drop selections in worksheet.

    New day, new challenge I am creating 5 listboxes in a userform with data in 1 column each. I need to have these populate a worksheet from selected items and place selection in a worksheet in a column. It does drop these into a building column, but the data is wrong. The problem is, as of now...
  12. welshgasman

    Strange behaviour in macro?

    Hi all, I set up a little macro to be able to get to a case quickly in our charity CMS system. Works great when the activity below does not happen. I select a cell with case number. On some occasions cell A1 is selected before trying to go to the website and as that contains the word 'Name' it...
  13. S

    Copy a cell text without any line break

    Good day, I need a Private sub when double clicked on a cell it must do the same as putting the cell to edit mode F2 and highlighting/selecting all text and copying it to clipboard. Currently it copies the text but when pasting in another program it pastes with multiple line breaks and i have...
  14. L

    improving userform

    Hi I have a userform which has a label as a question and 3 radios buttons as an answer. The form is this http://tinypic.com/r/6gaj2q/9 http://i65.tinypic.com/6gaj2q.jpg When use click on Math button, math cell value will be incremented by 1. Everything is working fine if a user will click on...
  15. I

    Dynamic List Sheet simplifying

    Hello I have a dynamic sheet that I am working on that requires a drop down list for multiple cells. I have a table for each drop down list to make the main list searchable as demonstrated here https://www.extendoffice.com/documents/excel/2439-excel-drop-down-list-search.html. The problem is...
  16. G

    Vlookup using vba with auto fill in a textbox

    I am writing a spread sheet that will let the user know if a torque wrench passes or fails. I have 2 Sheets. Sheet 1 holds the information from userform1, The second sheet (sheet2), holds the serial number, torque value, and the manufacturers number. (3 columns) I have the first form (form 1)...
  17. kelly mort

    Randomly run one out of three macros

    Hello , I am looking at three separate macros right now. Say : macro1 macro2 macro3 . Below is the button to call Private Sub CommandButton1_Click 'Inside here I want to choose one of those macros at random End Sub How will I run just one of those three at random?
  18. K

    macro track changes return error #6 overflow / #13 type mismatch

    hello, i'm a macro beginner and i've got an error #6/#13 on this 2 code, what's wrong with this and how can i amend it? thank you so much error #13 type mismatch (select more than 1 cell) Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)Dim sSheetName As String...
  19. Y

    Change code for hide port of text in one cell

    hi, everyone I want to change the following code to hide the port of text in one cell whit ";;;". Can you help me?? Private Sub Worksheet_Change(ByVal Target As Range) Dim AOI As Range Dim c As Range Set AOI = Range("A1:A20") If Not Intersect(Target, AOI) Is Nothing Then...
  20. L

    How to skip 'Compile error in hidden module' error message

    I have a workbook that was written in 32bit Excel and I'm trying to upgrade these sheets to work for 64 bit excel. The code that I need l find and replace is the following: find = "Private Declare Function", replace = "Private Declare PtrSafe Function". Problem is when I open the 32 bit sheet I...

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