+ Reply to Thread
Results 1 to 6 of 6

passing control from control to the worksheet

  1. #1
    Registered User
    Join Date
    06-01-2006
    Posts
    15

    passing control from control to the worksheet

    I have a command button
    Please Login or Register  to view this content.
    stopone is a drop down menu that looks up information for a table on a another sheet.

    Based on the stopone value now being nul another cell (A11) on the sheet should go blank but it retains the previous value from stopone. As soon as I click on the worksheet itself A11 goes blank. I've tried adding the line "Worksheets("Calculator").calculate to the code but it does nothing. It only recalculates when I click on the worksheet. What am I doing wrong and how do I do it correctly?
    Last edited by royUK; 09-03-2008 at 11:59 AM.

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    I don't know exactly what you want, maybe
    Please Login or Register  to view this content.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Registered User
    Join Date
    06-01-2006
    Posts
    15
    Thank you for the reply. What I'm trying to say is that
    Please Login or Register  to view this content.
    doesn't work. nothing happens when it comes to that line in the routine.

  4. #4
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    It should calculate a sheet called Calculator, nothing will show unless you have changed that worksheet.

  5. #5
    Registered User
    Join Date
    06-01-2006
    Posts
    15

    Question

    Thank you - we may not quite be on the same page. The sheet named "Calculator" has a drop down combobox and from that box the user can select a name from a table. The name is then replicated in a cell, for example A11. Beside the combobox is a reset command button. When the user clicks on this button it resets the value of the combobox to nul and sets the reset button visible=false. Since the value of the combobox is now nul then cell A11 should be blank and not retain the previous value. Cell A11 only goes blank if I click someplace on the worksheet. I have tried to use the command line - Worksheets("Calculator").calculate - to force the sheet to recalculate and hopefully A11 would go blank. Another curious quirk is that the name of the sheet is "Calculator" with the "C" being capitalized. However, when I type it in the command line with a lowercase "c" it automatically should become capitalized - but it does not. Any final thoughts on this problem?

  6. #6
    Registered User
    Join Date
    06-01-2006
    Posts
    15

    Smile Solution found !!

    Ok I have found the solution - thank you all for your help - FIRST the focus has to be taken off the command button and put on the worksheet by using the line command " Range("A11").select THEN you can use " ActiveCell.Calculate " and it recalulates the entire sheet.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. control worksheet scrollbar using userform
    By stoey in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-11-2008, 02:43 AM
  2. Replies: 8
    Last Post: 08-05-2008, 01:19 PM
  3. Resolving Weighted Average #Value error in worksheet
    By salmanjan in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 06-09-2008, 07:22 PM
  4. Replies: 3
    Last Post: 08-17-2007, 02:51 PM
  5. Passing a worksheet into a subroutine
    By dmartindale in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-13-2007, 10:41 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1