const

  1. A

    Unable to Solve this error - Method Document of object iwebbrowser2 failed

    Hello All, I am trying to create a macro that opens a website that is windows authenticated and click on a button named "Login" and then take a screen shot and paste it in a new word document. I am getting the error, "Method Document of object iwebbrowser2 failed" and when I click on Debug and...
  2. A

    Error at .CopyFromRecordset rs

    Need some assistance. I have a vba that works on my work computer but it will not work on my home computer. Get a runtime error 9. Doing debugging everything worked until I got to Workbooks("40TH SIG LRR Master").Sheets("ZMPRPT").Range("A2").CopyFromRecordset rs. Please assist. Sub GetData()...
  3. T

    Find last row of a closed workbook

    This code Sub Test() ' file name, sheet name and column number - change to suit Const FName As String = "P:\TEMP\MrExcel\FileLinks\[MyFile.xls]" Const ShName As String = "Sheet1" Const ColNo As Integer = 1 Dim ShNew As Worksheet Dim LastRow As Long...
  4. K

    Const values for late binding declarations

    Hello Everyone! I am looking for a complete list, if it exists, of all MS Office application function’s constants values. I want to be able to use late binding, but in order to do so, I need to declare all application specific functions as a Const like in the example below. Const...
  5. A

    Use Lastrow found as a Public Constant?

    Hello, I am wondering how I can add my lRow as a public const so I don't have the same code in every module doing the same thing This is what I am using to get my last row used and works great. Dim lRow As Long lRow = Sheet1.Cells(Rows.Count, "A").End(xlUp).Row + 1 I am hoping to...
  6. JenniferMurphy

    Stepping thru a range in a sub

    I need to step thru a range of cells in a Sub setting the fill to either red or green depending on whether the contents are less than or greater than 0. Using the macro recorder and information from MSDN, I came up with this: Const Col1 As Long = 3 Const Col2 As Long = 6 Const Row As Long =...
  7. D

    Userform combobox populates different range than written code

    I am working with an update/delete routine in my listbox, and I've come across something strange. The combobox code below is intended to display name of value (e.g. Group), and listbox is intended to display unique values (email) associated with the combobox selection. The code was doing it's...
  8. A

    VBA Pick up value from a declared Const variable

    Hi Guys, Can someone help me to get the variable from a declared Const into my proc. The "hKey" does not pick up the Const value in the line "oReg.EnumKey hKey, rPath, arrSubKeys" This code runs fine when I hard code the value in the proc and also works ok when I use the value...
  9. E

    Const dtEarliest formula help

    Hey, I have the following formula: Const dtEarliest = "11/20/2015" How to I set the date in the parenthesis to automatically be today's date minus 10 days? Thank you. Emerson
  10. E

    Set Const as a dynamic/variable date

    Hello, I have the following code that works well. It searched for a file saved with the most recent date in the file name and opens it. Sub Test() '---Opens a sheet based on date, searches backward from today til it finds a matching date Dim dtTestDate As Date Dim sStartWB As String...
  11. E

    Can someone explain union , Const and

    Hello people, Could someone explain following terms/declarations or whatever you call it: Const Union Concat Chr I did read some on Microsoft website but I didnt understood. Could someone help me? Thank you in advance
  12. ClimoC

    SuperQuick Q: Constants...?

    So a Const/#Const only work as Private compiler constants... ie, for the module within which they reside. Can I have a Public compiler constant at all? Essentially, before every script in my 20 modules and forms runs, I want it to obtain the value from Sheet3, Cell E2 I would've thought...

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