excel vba

  1. V

    How to not allow an entry of '0' in a ComboBox

    I have a combobox in a user form for quantities to be entered. The quantities can only be numbers through the use of the following keypress macro: Private Sub CaseQty_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger) If (KeyAscii > 47 And KeyAscii < 58) Then KeyAscii = KeyAscii...
  2. D

    / Sharepoint online

    Hello All, currently I am working on getting a database setup with macros in VBA. I am facing the issue that when I upload my .xlsm to our teams sharepoint online. The built in macro button for opening a userform only works for me (who created it). If some of my teammembers try to press on the...
  3. H

    Comparing Data from multiple spread-sheets and fish out wanted data into a separate spread-sheet organized per tab

    I have multiple tabs of data (named AB, BC, CD, EF, FG, GH, HI, IJ, JK, KL, LM, MN, NO, OP, PQ, QR, RS, ST, TU, UV, VW, WX, XY, YZ, Z00, Z01, Z02, Z03) in my "critical numbers spread-sheet" with wanted numbers per application identified in each tab but columns and rows are inconsistent. I have...
  4. R

    How to Get Queries/Connection Name Using Excel VBA?

    Hi Everyone, I kinda lost here, how to Get each Queries/Connection Name and put it in a cell? Currently I use this to refresh each of the connection, and I want to put each connection name in a cell after it refreshed. can we do that? '3. Refresh all query connections...
  5. R

    Merge Sheets into One Sheet Vba

    Hi Guys I have the following vba as follows : Private Sub Worksheet_Calculate() Dim iStr As String Dim iRng As Range, iCell As Range Set iRng = ThisWorkbook.Sheets("Input").Range("I2:I" & ThisWorkbook.Sheets("Input").UsedRange.Rows.Count) For Each iCell In iRng iStr = Mid(Trim(iCell), 1...
  6. G

    Is AutoComplete possible across sheets.

    I am using a workbook as an order form for inventory. I have a macro that copies all the Items that were entered on the order form to a Item Master Sheet. Another Macro then removes any duplicate items. When I fill out a new order form and start typing in the item, I want excel to...
  7. D

    Create a new workbook and worksheet by getting the data from the certain columns and rows

    Hi folks I need your help on excel file transformation. So, I want to create database table names which has been originally stored in excel file as provided below. Thus, I need VBA code to copy out the certain cells and paste them as a filename, sheet name, column name and as a row. The desired...
  8. M

    Excel VBA to print specific pages from multiple sheets into one document

    Hi! I'm a beginner with VBA and would greatly appreciate any help or advice. I have a command button set up on Sheet1 that when you click the button, 3 different worksheets (all in the same workbook) will print, but will only print a certain number of pages from each worksheet. The code I have...
  9. A

    moving columns to new sheet excel VBA

    So I have a sheet with information in columns (approx 200) which I would like to move to new sheet. The idea is that I need column A in each new sheet following with column B, then next sheet again column A + column C and so on till the last column. Could someone help me with this...
  10. P

    Shifting columns if criteria meets

    Hello everyone. Thank you for letting me join in this group. I am new to an Excel and I am facing with some problems. Please help me answer to my problem. The below 1st figure is that's what I have. Here, I would like to find fruit that contain like *pple*. If it is found, I would like to find...
  11. Z

    Format a TextBox on a Userform to 2 decimal places

    Hi! Am having a similar issue as described in this post. My code is as follows: Private Sub cmdCalculate_Click() If IsNumeric(Me.txt_odds.value) Then Me.txt_odds = Format(txt_odds.value, "0" & Application.DecimalSeparator & "00") End If Me.txt_Minimum = Format(100 / txt_odds.value, "0" &...
  12. D

    Excel VBA: extract top row of every Worksheet in every workbook within a folder

    Dear folks I need Excel VBA procedure to extract top row of every Worksheet in every workbook within a folder ex: I have 400 excel files and each worksheet there are top rows that I have to get them all and summarize in one excel sheet for further analysis Excel VBA Procedure should copy out...
  13. M

    Print range to PDF in color

    I have this code that works perfectly but I need it to be in color, is there a small tweak I can make to print in color? Sub Save_as_pdf_W2IncomeCalc() Application.EnableEvents = True ActiveSheet.Unprotect Password:="Mortgage1" Dim PrintRng As Range Dim pdfile As String 'Setting range to be...
  14. M

    Code to find a string but need to handle multiple matches

    I have this code provided from a very helpful coder :) it searches for a string within a range, it currently searches 2 columns and then takes you to the first match. Was wondering if it can be tweaked so that if there is more than 1 match to ask the user if he wants to go to the next match...
  15. M

    search that returns cell position

    I have a body of data in range a11:ce1000, In cell F3 I want to type in a string and when I hit enter I want it to search in column B and D and if found I want it to jump to that cell, is that possible? if so, are there any samples I can look at, I tried searching but really didn't find anything...
  16. D

    Opening a specific file and copy some cells to the last empty row

    Hi, I need help with a vba. Firstly, I would like to open a specific file (name: "File 1") then copy cell A1, A3, B2, C4, C7, D2 from this file, from sheet "Profile" to another file (name: "Template"), to "Sheet1" to the last empty row together with a button on "Sheet1". Any help would be much...
  17. Z

    Highlight differences of values in two named ranges

    Need a VBA to select and open two workbooks containing the same defined names, however, different with ranges, then, highlight in one of the workbooks the differences of contents for every named range.
  18. A

    Create a variable for an excel workbook through Outlook VBA

    Hi All, I am writing a macro in outlook vba to save attachments in an email to a specific folder, but I need corresponding information from an excel workbook. My code will work if the workbook isn't open (i.e it opens the workbook and does what it needs to do) however when the workbook is...
  19. R

    How to Filter Combo Box as User Typed?

    I have using one of ComboBox in UserForm and load the values from code behine function called while Userform Iniated. I need that ComboBox should filter and show as what user typed. Eg: Values are "OUTLET, SALES, SUPPLIER, SALES CATEGORY, PURCHASE, SALES MODE" User type as "SA".. list items...
  20. C

    How to Auto Highlight Userform Last Entered Item

    Hi How can you auto highlight in userform the last entered item? This is the code I'm using to auto-select the last item entered. Me.lstDatabase.TopIndex = Me.lstDatabase.ListCount - 1 Me.lstDatabase.BackColor = RGB(153, 153, 255) ? Thank You!

Watch MrExcel Video

This Week's Hot Topics

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