variable definition

  1. J

    Select Sheet Based on Cell Value

    Hello all, While I've been an avid browser for years, this is my first posting of a question to any forum ever. I normally google search my problem, as most problems have occured before, but I'm having trouble getting this one to work specifically. Any help would be appreciated. I'm creating a...
  2. P

    declaring variable in Sub statement?

    Hi, I am trying to make sense of quite an elaborate macro built by someone else. This has the following line of code Public Sub readOperation(rowNumber As Integer) Dim rowOff As Integer rowOff = rowNumber - 1 'other arguments and conditions End Sub What I am buggered about...
  3. C

    Issue with variable type?

    When this step is reached, "Data1 = Str(F1.Cells(x, 1))" I get the error "Type mismatch." It only happens when the input data changes from a string of numbers stored as text "6666666" to "wafer test 112608" Is there a better declaration for Data1? Public Ary1() As String Dim Data1 As...
  4. A

    Macro To Activate Window / Workbook

    Hi There I am new to writing macros and having a prolem getting excel to activate a window. Background: - Excel 2007, Windows XP I have one file called NEW PB SPREADSHEET 10-11.xlsm with multiple tabs. I want the user to click a button that will invoke the macro. The macro presents the user...
  5. T

    Using variables with PowerPivot

    I'm trying to use VBA with PowerPivot, and I'd like to change the slicer field by using a variable. The code below was from recording a macro and works fine when the client's name is explicit as in the code below. When I try to replace Smith in the code with a string variable, I get a...
  6. E

    Option Explicit - Declarations

    Hi, Several people on this board have recommended that I alway use Option Explicit in my VB code (via the Tools, Options, Require Variable Declaration option) Firstly, what is the thinking behind this (or what are the implications of not doing this?) Secondly, When I have a lot of code, I...
  7. M

    Macro - Multiple Variable

    Hey Guys I need to create a macro that can count different columns from a huge Data Base and then save each result in a specific cell in another file.<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p> I have more than 70 different columns to be counted and...
  8. S

    Add a User-selected range to Solver Macro

    Ok I admit I may be a little over my head trying this but I want to score some brownie points in my internship. I used the macro recorder to record a macro for using solver as shown below: Sub BreakEven() ' ' BreakEven Macro ' SolverOk SetCell:="$G$32", MaxMinVal:=3...
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

This Week's Hot Topics

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
Top