target.address

  1. A

    Is there a vba code for when I exit a Target.address?

    Hello, I have a vba script that uses the Worksheet_SelectionChange(ByVal Target As Excel.Range) sub in this sub I have multiple cells given a Target.Address if statement. like this. ElseIf Target.Address = "$F$21" Then Call DCmVoltsSection ElseIf...
  2. L

    Macro to run when cell is changed

    I have set up some code so that when cells G3:I3 change a macro runs using the below code. Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address = "$G$3" Or Target.Address = "$H$3" Or Target.Address = "$I$3" Then Call ScheduleModule.UpdateSchedule End If...
  3. E

    VBA Target.Address for multiple cells

    Hello, I have the below code that works perfectly if you enter/copy data one cell at a time. But I copy/paste multiple cells all the time, at which point the code below gives me an error. Is there a way to adapt the below code to work with multiple cells changing at the same time? Private Sub...
  4. W

    need to add cell to this VBA code

    Need to add Cells D7, F7, H7, J7, L7, N7, P7, R7 can't get it to work. Private Sub Worksheet Calculate() If Target.Cells.Count <> 1 Then Exit Sub If Target.Address <> "$B$7" Then Exit Sub If (Target.Value >= 0) And (Target.Value < 0) Then Exit Sub Pictures("Picture 7").Visible =...
  5. F

    How to save macro workbook to a new workbook as xls with same formats

    Hi All, I use the below code, will be reduced to smaller level, I am just making the rows hide, if the cell value is blank. Also, i was trying to save the file in a path, however when we click on Alt F11, it still shows this code. Private Sub Worksheet_Change(ByVal Target As Range) If...
  6. D

    VBA explanation please.

    Can someone explain what this code is doing? thanks in advance. Private Sub Worksheet_Change(ByVal Target As Range) 'Updateby Extendoffice 20160725 Dim xCell As Range If Target.Address <> Range("C54").Address Then Exit Sub Application.ScreenUpdating = False For Each xCell In...
  7. DataBlake

    [VBA] Import Sheet From File Path & Cell

    I have a sheet macro on a sheet named "Program Start" that opens various userforms based on which cells are clicked as well as switches off the sheet. When the userform portion of the code is completed it returns the sheet selection back to Program Start. If Target.Address = "$H$2" Then...
  8. C

    Combine two Private Sub Worksheet_Change formulas

    Good morning, I am in need of combining two Private Sub formulas together. Individually they work, and are as follows: Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address = "$F$2" Then Range("F3").Value = "" End If If Target.Address = "$F$3" Then...
  9. A

    Loop through ranges inside condition

    Hello There, I have the following code: Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address = "$B$12" Then Range("C12").Value = "Please Select..." End If If Target.Address = "$C$12" Then Range("D12").Value = "Please Select..." End If...
  10. L

    Amy possible that i can create a simple VBA based of repetitive VBA

    Hello, everyone.. i need some help to make this repetitive VBA into a very simple VBA My repetitive VBA were shown as below If Target.Address = "$L$6" Then a = Sheets("Price Record").Cells(Rows.Count, "A").End(xlUp).Row + 1 Sheets("Price Record").Range("A" & a).Value =...
  11. D

    Procedure too large error

    Hello, I have a worksheet selection change event code which is basically the same code copied 21 times with the only difference being the row number. Each row on the worksheet is for a different student. I am getting a "procedure too large" error and need to shorten the codes. The code...
  12. R

    Trouble with two Worksheet_Change codes

    Good Afternoon, I'm new to VBA codes and need some help. I would like to have the two code below operating on the same worksheet. I've got the first one working but not sure how to add the second. Some help would be greatly appreciate. Code 1) Private Sub Worksheet_Change(ByVal Target As...
  13. I

    VBA- Navigation List

    Hello! I am trying to build a macro to be able to navigate in one sheet. It seems too complex to me, as I don't have programming background. The idea is the following, I have this summary list: <tbody> Column G Column I 100 USA 120 EU 140 JAPAN ... ... </tbody> Column G contains the...
  14. C

    Multiple cells to open one userform

    Still relatively new to coding. I'm trying to build an equipment schedule so I know where gear is going/has been. I'm trying to set it up so I can double click the piece of equipment which will in turn run a user form. It works for my first line (A3), but not for anything after. Private Sub...
  15. R

    Skipping vb code

    Hi. I am not a VB programmer, but I expect the answer would be easy for those who are. I have a simple VB routine running on a spreadsheet that clears the contents of a cell when the value has been changes. I would like to add a checkbox to my spreadsheet to turn on or off this feature...
  16. C

    Help to edit VBA code for Dropdown list for multiple selection?

    Here's my code: If Target.Address = "$F$13" Or Target.Address = "$F$14" Then. Now my problem is I have to make it up to "$F$1000" and it's very frustrating to enter it one by one. Is there away to make the code shorten? Thanks
  17. E

    Clear Contents, Independent Instances; Separate Worksheet VBA

    Hello. New to the MrExcel. I'm currently building a form that requires separate instances of cells being cleared based on cells from other worksheets changing. Private Sub Worksheet_Change(ByVal Target As Range) 'When E1 changes, E2 clears, and c20, d20 .... j20 all clear. If...
  18. A

    ActiveSheet.Name not working for some users

    Hi everyone, I have a report that updates data when the dates are changed either in field C2 (from) or field F2 (to). It goes like this: Private Sub Worksheet_Change(ByVal Target As Range) Dim TValue As String, TAddress As String, Tsource As String If Target.Address = "$C$2" Or Target.Address...
  19. J

    Target.Address is a merged cell

    Hi, I am struggling with the VBA code below. The code works fine until I delete the contents of the target cell, this does not have the desired effect of hiding the row below. I believe this is due to the target cell B315 being merged with B316. Any ideas how I can rectify this? Thanks, Justin...
  20. R

    VBA multi-select dropdown menu help

    Hi, I have the below code, which enables me to select multiple options from a drop-down menu. However, I want to amend this to column I, J and K - but the code is not letting me go any further than I37 (it goes red). This does coincide when it moves to the next line if this could be the issue...

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