excel-vba

  1. E

    Cannot Hide and Show Particular Sheet on VBA

    I have this code assigned to a command button (on sheet 5). My goal is when the command button is clicked, sheet 4 will be shown and other sheets will be hidden. But unfortunately when i run the code, it shows error: Run time error 1004: application-defined or object-defined error Any idea how...
  2. E

    Remove Table Row From Userform

    I have made a userform for deleting a row of data. Is it possible when i delete a row of data, the only row affected is the table row, while the same row outside the table is not deleted? For example, if want to remove Bill, test1, and 345, is it possible to make the data1 still remain there...
  3. E

    Remove Table Row From Userform

    I have made a userform for deleting a row of data. Is it possible when i delete a row of data, the only row affected is the table row, while the same row outside the table is not deleted? For example, if want to remove Bill, test1, and 345, is it possible to make the data1 still remain there...
  4. C

    VBA code need to only copy and paste visible cells, code needs to be amended

    I have written this code and it has worked until now, I am still relatively new to VBA and now having issues amending the code, I have put two VBA Code: AutoFilter to pull certain rows, but I can't seem to work out how to only copy and paste visible rows, I have tried VBA Code: Set TempRng =...
  5. R

    Dynamic "Columns:=Array(1,2,3)" in RemoveDuplicates excel VBA

    I am new to VBA. Currently I am using this, lastColumn is last column of worksheet. lastRow is last row of worksheet. It is working fine for: ActiveSheet.Range(Cells(1,1), Cells (lastRow,lastColumn)). RemoveDuplicates(Columns:=Array(1,2,3), Headers:=xlNo) - But it will work only for 3 columns...
  6. S

    Compare Two Columns in two different workbooks using VBA

    The below one has written with specific range and in the same workbook in two sheets(sheet1,Sheet2) looking for your help guys,If row range changes dynamically(no specific range) and in two different books.how to write Different way of approaching the common column in excel is also accepted
  7. V

    excel formula to find maximum within same cell having multiple values of right most numbers

    I want to find maximum and minimum for right most number from same cell having multiple values, below is the how data looks. This all values are in same cell, ex: in cell "A1" I want to extract rightmost number, like 1.00,1.5,1.5,1.0,2.00,1.50,1.0,1.00 and find max and min from it. I am...
  8. dreen

    Why are my values not copying over to another Workbook

    I have read other posts and I still can't seem to figure out what I am doing wrong... I have two workbooks, one with the code in it (Sheet1 is the codename of the sheet I want to copy values from) and another workbook defined as "y" in this example. I want to copy over the value of K1 in Sheet1...
  9. B

    excel vba save worksheet as pdf.

    I'm having issues with this code not saving my file. I get an error 1004. it worked before. does any one see any issues with this code? Option Explicit Sub SaveAsPDF() Dim strDir As String strDir = CreateObject("WScript.Shell").specialfolders("Desktop") & "\Daily Reports\" If...
  10. rediffusion

    Creating a `PopUp Menu` using 'CommandBarPopup' what other methods are there? Context Menu.

    I stumbled on this method add a `PopUp Menu` from Ron de Bruin (I olso write to him but no react). It describes how to add a "Menu" is there code to add for example "Gallery" (I'm more interested in the gallery), "ToggleButton" or "SplitButton" ?
  11. rediffusion

    `Insert Note` how to zoom in/out without manually stretching?

    Tired sometimes to pull some kind of end! How to make the whole Sheet "Excel" or set the size of 600px. I think the macro might be good! For example: 1) Point at the Cell. 2) Run the VBA macro in which the form appears. 3) In the form enter the desired size in pixels. another... 1) Point at...
  12. rediffusion

    Workbook_Open - how to combine one and more codes?

    Hi all! I duplicate this question because сouldn't find a solution. :( Cross-post is here. :warning: I have in <code style="margin: 0px; padding: 1px 5px; border: 0px; font-variant-numeric: inherit; font-variant-east-asian: inherit; font-stretch: inherit; line-height: inherit; font-family...
  13. rediffusion

    Run Visual Basic after starting Excel.

    I find this code on site. Private Sub Workbook_Open() UserForm1.Show End Sub It's not working. I want to open «Visual Basic» after starting «Excel» then open the window 'Module1' for example. Is it feasible?
  14. B

    Leaving empty cells if output is blank with a macro

    I have the following macro. Everything is ok with it, I just need to leave empty cell if there is no output (no values/numbers). Is it possible to do this? Can I get some help, please? Thanks. In the current code, if there is an output in the cell (eg 6), thats ok. but if there is no output...
  15. T

    How do I run a macro in Excel when the enter key is pressed on a specific cell

    I'm currently trying to create a tool that will call/run another macro/sub when the enter key is pressed on cell B4. Cell B4 will be the search field. Whenever someone types something in this field and hits enter on their keyboard I want another macro called "searchcontains" to run I've...
  16. M

    Using Workbook Functions in Excel VBA Add-in

    I am creating an add-in that adds an option to the right-click menu that will let me run my macros. I've used the functions found here but when this is saved as an add-in this functionality doesn't work anymore. What would be needed to fix this...
  17. S

    Update multiple pivot tables to the last row of data.

    I have multiple pivot tables on 5 sheets named in the code. Data source for all of them is "CUIC data", which i update daily. I want to change the data source and refresh all the pivot tables in all of my worksheets. The code i have works for one sheet, but i dont know how to get it done for...
  18. G

    Trying to fetch Youtube Trending videos name and links using Excel VBA

    I'm trying to fetch Youtube Trending videos into excel sheet with Title and video links. But my code is not working. I do not know whether there is something wrong with my code or the trending page. This is code from where i am trying to video the data VIDEO TITLE When i run the code. It...
  19. D

    VBA - ActiveSheet.ShowAllData works differently on 2 machines

    Guys, I have some macro that filters all the data (250 rows) by one column, then deletes the data that is hidden after filtering. Next step is unfiltering whole sheet using ActiveSheet.ShowAllData. What's strange, on my machine after unfiltering my used range seems to be 200 rows (50 rows...
  20. D

    Print button

    So I created some code that will allow a user to enter multiple pages of data and then just click a print button to click the number of pages of data he has entered. However we are running into a problem where by if a user enters 200 lines of data, then deletes the last 25 lines, it is still...

Some videos you may like

This Week's Hot Topics

  • Use Filter function with 2 criteria to return a specific value
    I've spent many hours trying to find out why the basic formula for Filter function with 2 criteria will not return a value other than #CALC. I'm...
  • Loop stopping at row 10
    Below is a code I had a lot of help with from user such as yourself. This code worked well but now is stopping a row 10 and I can't see why! Could...
  • Numerical Order Code for Macro
    I am trying to find a code or fix what i have on the macro that will automatically make the certain column generate in numerical order when I...
  • Calculate time in excel
    I get a text report from our time keeping system that i dump into excel through a data connection and I need to calculate the total hours for a...
  • VBA
    Hello everyone, I need your help please. I just need VBA code to get my reports working. What I want to do is whenever these dropdowns are...
  • Help with formula to sum numbers prior to date
    Hello, I was hoping to get some assistance as I'm having trouble with this. Using my table below as an example, how could I write a formula which...

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
Top