vba code help

  1. L

    VBA code which show a Pop Box in Excel if condition is meet.

    Hello Friends I am in little trouble hope you will help me. I have a excel sheet and into this sheet data is fetch from another Software (Live Data). <colgroup><col><col span="2"><col></colgroup><tbody> Company Name Value Reaching Value Status A 1000 2500 Sell B 5000 2500 C 4000 2500...
  2. H

    Show Values instead of formulas when you click on any cell that contains formula

    Hi everyone, I have a workbook with multiple sheets. All sheets contains formulas and static values. I have already protected the sheets but I don't want to hide the formula in the formula bar. What I am trying to achieve is when ever someone is using my workbook and when they click on any cell...
  3. B

    Trouble with VBA CODE HELP...

    Hi Guys, I am using the below code to return some information from a sheet under the name of "lenses" based on a value entered into cell B7 and it should return this information into B29 but everytime I try and run it nothing happens. can anyone help me please? Private Sub...
  4. I

    VBA Code To Search Workbook For Strings And Paste String + SheetName

    Hi Guys, First time newbie here. I have a workbook with several sheets. I am trying to search using row values of one sheet across the workbook. When there is a match, the string searched for and the sheet name where the string is found should be recorded. I have no idea if this is doable...
  5. J

    VBA code to move data with selected criteria - coding questions

    Hi, I am trying to create some code that will move data from one worksheet to another if it meets a certain criteria.The criteria will be a product category and a week number. If possible the week number will change incrementally and on a weekly basis. For example this week is week number 37...
  6. K

    Code to prevent saving preventing me from saving code to prevent saving - LOL

    I am using the following code to prevent users from saving a document. The problem is, I can't save the code in the document either as it's preventing all saving. OMG!!! How funny. Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) MsgBox "Please don't use the save...
  7. C

    Detect Duplicate Entry as soon as its typed into the Userform

    Dear All, I have developed a user form with multiple text boxes and combo boxes. Request your assistance in writing the VBA code, which detects and pops message of DUPLICATE ENTRY, as soon as something (say ID number) is typed into the first text box or when tab is pressed to move to the next...
  8. Y

    VBA Group total

    Please see the following and help me how to get the result on Sheet 2 in Macro <colgroup><col><col><col span="4"></colgroup><tbody> Sheet1 (input) Price1 Price2 Price3 Level1 Orange 6 7 3 Apple 5 7 3 Lemon-Yellow 3 3 7 Banana 7 3 8 Lemon-Green 3 7 7 Level2...
  9. M

    VBA Code - Formula from one workbook to another

    Hi, Need help. I am an excel macro newbie. I want this formula from my current workbook to lookup for values of G4 to another workbook. The another workbook file name is in the current workbook A1 cell. Here's my code. Dim otherWB As Workbook Set otherWB =...
  10. R

    How to import a specific block of data from a closed workbook

    Hi, I'm very new at VBA, and I want to learn how to import a specific block of data from a closed workbook to my active workbook (in which my macro will be placed) in the following manner: 1. Prompt the user to select the workbook 2. Prompt the user to select the sheet 3. Prompt the user to...
  11. C

    VBA file name has period but want file format recognised as xlsm or 53

    Hi I'm writing some VBA code to take the value of cell C7 and copy the sheet into a new workbook, unless C7 is blank. The problem is that the file name from C7 has a period in it that is seen as the start of the file type. The period needs to stay! When the process of taking the value of C7...
  12. S

    Problem with .WriteLine and .OpenTextFile(..., 8, ...)

    I want to generate a log while my VBA program runs. Firstly, I initialize the log file and add a title. This works. Then, I want to add info (AddinfoLog). When I open the textfile in MS Wordpad, I see Chinese character intead of "test" on the last row. When I change the 8 to a 2 to write (and...
  13. S

    Closing opened files (also non-xlsx) with VBA

    Hello I use the IsFileOpen function from VBA Express : Excel - Check If a File Is Already Open to detect if a certain file (pdf or xlsx) is open. How can I close a pdf or xlsx file that is currently opened? What I want to achieve: for each objFile In objFolder.Files If...
  14. A

    Error message if any of 3 cells are blank

    On a spreadsheet I have a "Save" button which saves the sheet in a specific place determined by the contents of 3 cells. C4 = Date, E4 = Venue, I4 = Name These three cells determine the location and name the file will be saved; c:\Venue\Year (from C4)\Month (from C4)\Name (a combination of day...
  15. B

    vba code to aggregate data selection from checkboxes into listbox

    I am at a loss for how to do this. My current code is simple and displays data only for the latest checked box: Private Sub ComboBox1_Change() End Sub Private Sub CheckBox1_Change() Me.ListBox1.RowSource = "Sheet2!A22:A32" End Sub Private Sub CheckBox2_Change() Me.ListBox1.RowSource =...
  16. L

    VBA working most of the time... Please Help

    Ok so here is the issue. I have a VBA that pulls the information from one sheet and puts it in another sheet on the same workbook. Everything thing works great except for whatever reason it is picky on what it pulls and what it does not. On WorkSheet "Calculator" I have 4 Columns (A:D)...
  17. S

    VBA code to overwrite formula

    Hi, I would like to have user overwrite formula in c8:f8, if there selection is not found in a drop down box located in a8:a37. After they overwrite the formula i would like the sheet to be reset, with the original formulas put back in. Any way to do this?? the formulas in column c, d, e, f...
  18. R

    vba code to save an existing workbook with a new name

    I have this code that, in an existing open workbook (let's call it "Template"), looks for any tabs that have a name begining with "CC". For each of these tabs, it copies the tab into a new workbook, deletes any extra tabs, then saves the new workbook to my desktop. Sub Copy_Save_CC()...
  19. S

    VBA Code HELP PLEASE

    Hi Guys I am trying to use VBA code to find and replace a column number in a cell reference from column A to Column B, however in the cell reference $A has been used. I have tried to perform this using the code below but it doesnt work. Code: Sub test() On Error Resume Next Dim c As String, d As...
  20. S

    VBA Code Problem

    Hi Guys I have a worksheet which has about 250 cells which have links to another excel spreadsheet. Cell B10 will =OtherSpreadsheet$D2, Cell B11 will =OtherSpreadsheet$D3, etc. however on a weekly basis I may need to change the column the info is coming from in the OtherSpreadsheet. So one any...

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