+ Reply to Thread
Results 1 to 4 of 4

A Code pause and resume and to change a cell value based on another cell..HELP?

  1. #1
    Registered User
    Join Date
    04-21-2016
    Location
    Germany
    MS-Off Ver
    2010
    Posts
    2

    A Code pause and resume and to change a cell value based on another cell..HELP?

    Hi every one..
    im new here..and im also new to excel VBA.. i have some question and hope i find the answers here.
    so without getting into much unnecessary details:

    1) i want for example in cell A1 the user with enter a Grade No. from 1 to 100..i want the text in cell B1 to change accordingly to a grade!!
    if A1 = 1-50 i want the text in B1 to be "the score is (A1 value) and this means the student failed"
    if A1=51-70 then B1= "the score is (A1 value) and this means the student is good"
    if A1= 71-90 then B1= "the score is (A1 value) and this means the student is very good"
    if A1=91-100 the B1= "the score is (A1 value) and this means the student is excellent"
    So thats the easy Question

    2) the hard 1 is: is it possible to pause a sub in the middle to ask the user if he wants to enter some data in worksheet manually and if he says YES then it activate this sheet and allow him to enter data.. then when hes finished he can click a button to resume the sub where it stopped till the end of the sub and to the next sub.
    However if the user didn't want to enter data manually he can click NO then it jumps to the next sub directly..

    this is a tricky hard 1, huh?? but i think i'll find my answer here

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: A Code pause and resume and to change a cell value based on another cell..HELP?

    Both quite simple.

    The first part.

    Right click on your sheet name at the bottom of excel and select view code.

    Paste this code in the module that opens, then close the module. Type a number into A1

    Please Login or Register  to view this content.
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  3. #3
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: A Code pause and resume and to change a cell value based on another cell..HELP?

    The second part is a bit harder.

    You need to insert this line into a normal Macro module:-

    Please Login or Register  to view this content.
    Your code for example 1 needs to be ammended to:-

    Please Login or Register  to view this content.
    Finally create a userform with a command button and paste this code into the userform Macro Module:-

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by mehmetcik; 04-21-2016 at 07:18 PM.

  4. #4
    Registered User
    Join Date
    04-21-2016
    Location
    Germany
    MS-Off Ver
    2010
    Posts
    2

    Re: A Code pause and resume and to change a cell value based on another cell..HELP?

    Honestly i did expect that i'll find the answer here...
    what i didn't expect is, having it so fast..
    so even before i check if the codes work and i'm sure they will..just wanna say thanks very much..

+ 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. Pause and Resume for Excel timer
    By unfolgsamone in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-09-2014, 05:25 PM
  2. Problems making VBA code to create start, pause & resume command buttons
    By shaunb84 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-26-2011, 01:20 PM
  3. Pause and resume between series of macros
    By jomili in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 01-03-2011, 09:48 AM
  4. Pause and Resume
    By fierygod in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-08-2010, 03:43 AM
  5. Countdown Timer Pause and Resume Button
    By table83 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-07-2010, 08:37 PM
  6. Pause and resume button using VBA
    By kyod in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-08-2009, 08:36 AM
  7. Is there a way to Temp Pause and Resume a Macro?
    By 0o0o0 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-24-2006, 05:28 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