with statement

  1. P

    Variant-type object array element is deallocated by With statement

    If an object-array is declared as a Variant type (in order to easily check whether it is initialized using the IsEmpty function) then, if the subsequently defined array's elements are referenced as the object-expression of a With statement (e.g. "With VariantObjArray(i) ...") then that...
  2. dreen

    How can I select a Specific Cell and execute a function in another cell if it is found

    I want to be able to check (This is the first With statement) if a certain cell value ("H4" in this example) in the open worksheet (I refer to this worksheet as Sheet1 as it is Sheet1 in my workbook) where the code is being written (what is the proper naming scheme for this worksheet where the...
  3. Q

    VBA With Worksheets Statement Limitations?

    Hi guys, I'm new to posting but have been using this forum to answer Excel questions for years. I hope I post this right and if not, please tell me so I can fix it. Problem: I'm cleaning up some code I wrote a few years ago. Instead of referencing the worksheet every time, I'm trying to use the...
  4. T

    How to loop / with below code

    Hi all i have the below code that works perfectly when it is known that there is only one row item that needs to be copied from one sheet to another, then deleted from the orginal source. However i am struggling to convert the below code into a repeatable with / loop statment that checks...
  5. andrewb90

    Copy values to different sheet based on values in cell

    Hello all, I've been trying to look at similar code to try to put together what I want, and I'm still struggling to get it right, so I figured maybe somebody on here could help me out. I am trying to copy the values of multiple cells in a single row to a different sheet. The trick with...
  6. E

    Create a Master Format for Use on Multiple Ranges

    How do I create a master list of formatting attributes for the purposes of affecting multiple ranges simultaneously? For example, let's say I want the same format for the following defined ranges: Dim r2,r3 As Range Set r2 = Sheets("2").Range("B3:I502") Set r3 = Sheets("3").Range("B3:B1002")...
  7. andrewb90

    consolidate vba with statement

    Hello all, I'm trying to figure out how to properly shorten this bit of code, as I have a number of other userforms that I would like to have the same effects applied to, I keep getting errors trying to do it. Any help would be greatly appreciated. Private Sub...

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