+ Reply to Thread
Results 1 to 2 of 2

Help, No Userform running errors, but no Cbox values added to sheet on cmd button press

  1. #1
    Registered User
    Join Date
    11-27-2016
    Location
    East of England
    MS-Off Ver
    office 365
    Posts
    7

    Question Help, No Userform running errors, but no Cbox values added to sheet on cmd button press

    Hi Everyone,

    i am using the below code to place numbers into a grid on a worksheet, the numbers are selected from a userform full of combo boxes. The userform itself is running ok, with regard to no errors during use, but upon pressing the cmd button nothing is being pasted onto the sheet. can someone have a quick look at the code below and see if i am missing something obvious, ive not had any issues with the below code in the past, thanks.

    code:
    Please Login or Register  to view this content.

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Help, No Userform running errors, but no Cbox values added to sheet on cmd button pres

    You declare rRef and cNum in the Addme procedure. Those variables are local to that procedure. Local variables cannot be set in the CommandButton1_Click procedure, and subsequently passed to the Addme procedure like that.
    Last edited by AlphaFrog; 01-31-2018 at 12:07 AM.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

+ 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. vba userform Populate combobox when press the dropdown button
    By Ankers in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-13-2017, 03:30 AM
  2. [SOLVED] Form values not being added to worksheet-No errors
    By rob_h in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-01-2017, 06:08 AM
  3. force to press button before leave a sheet
    By anicolash in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-24-2014, 03:00 PM
  4. How to AutoSave backup when press exit button on userform
    By z-eighty2 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-09-2014, 04:51 AM
  5. [SOLVED] exit sub when press cancel button on userform
    By hcyeap in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-22-2014, 01:13 AM
  6. Show Required UserForm when Press button from Main From...
    By z-eighty2 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-21-2013, 08:37 PM
  7. Userform: Pass textbox values to another textbox on button press
    By adjustermn in forum Word Programming / VBA / Macros
    Replies: 3
    Last Post: 02-09-2010, 11:19 PM

Tags for this Thread

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