sub code

  1. A

    Basic Macro Question

    Hi Everyone, I have below code to insert documents into excel Sub Insert_OLE_Object() Worksheets("Sheet1").OLEObjects.Add Filename:="c:\temp\sample.pdf", Link:=False, DisplayAsIcon:=False, Left:=40, Top:=40, Width:=150, Height:=10 End Sub I want to know how can i can run above code by...
  2. X

    Compile error with collection

    I have a sub whereI declare and set a collection (Cat_colw) which consists of a number of 3x3 arrays.<o:p></o:p> I have a set ofvariables (gp1,gp2,gp3,…) that represent a 3x3 range of cells.<o:p></o:p> I use thestatement: gp2.Value = Cat_colw(1) , to enterthe values of the array Cat_colw(1)...
  3. W

    Need help applying a macro sort to row 1, since we don't use headers.

    This Sub is part of a large macro, but isolates the problem. It also runs independently as a call, as does the others like SortOHRows, SortMDRows, etc. because I'm not smart enough to compile them into ONE Sub! :) Nearly 100% of the time the rows with CA in column F are alphanumerically...
  4. M

    Sticking point Day 2 of VBA, Scraping with "Object" Errors thrown

    So this is my second day of VBA, I normally try not to post unless I am seriously in a hole and can't figure out black from white. Here is my code: Sub clickFormButton() Dim ie As Object Dim ieform As Variant, button As Object Dim ieObj As Object 'Appeasing Excel with object variable Dim...
  5. S

    Macro triggering other Subs not working: Weird

    I have a Module that has worked for almost a year but is now not working. I've had to rebuild the worksheet because of a un-delete-able style issue that was causing confusion on the part of the end users. So I copied this module into the new workbook. Here's a sample: Sub VehInv() cntYear...
  6. K

    How to Carry a Variable Through From a Sub into Another Sub

    How do I pass a variable from one sub to another, I thought the 'ByRef' definition was meant to do this, but it hasn't worked. The CONVERTPATH Sub converts a UNC path to a local drive number and vice versa when it is called from another sub. How do you get the variable 'Path' to be passed...
  7. P

    Currency

    does anyone know hot to solve the following. if a is true then the result is the number, if b is true (or a is false) the result is the number times 10, im supposed to use a sub, and it must be done in such a way that only executing the macro will compute the result for every #...
  8. O

    How to combine two Worksheet_Change subs into one?

    Hi everyone, I need help to combine the two following subs that work fine separately into one that works. Your help would be appreciated. Thanks! Private Sub Worksheet_Change(ByVal Target As Range) If Intersect(Target, Range("B9")) Is Nothing Then Exit Sub If Target.Count > 1 Then Exit 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