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...

Some videos you may like

This Week's Hot Topics

  • Problem with Radio Button's format control
    I am creating an employee evaluation template (a sample is below) Column A is the category Column B, C D, E and F will be ratings (unacceptable...
  • Last Display on userform to a Listbox
    [CODE=vba] lstdisplay.ColumnCount = 15 lstdisplay.RowSource = "A1:O600000" [/CODE] So when i do this it Displays everything on the sheet i am...
  • Rename and move files to a new location
    Dear all, I have an excel file with the following information. The actual file name is at column A but i want to rename it using the following...
  • Help with True/False Formula
    Hello! Am stumped how to fix this formula, in which my result returns 'True', but it should return False. =IF(AG2=True...
  • Clear extra characters from a provided range of cells
    Dear All, I have following code which gives me desired output to remove extra characters from a provided range. But it takes too much time when...
  • Help with Current and highest streaks
    Hi there, I've just joined the forum and this is my first post. I've already spent quite a bit of time searching the net and this forum for a...
Top