+ Reply to Thread
Results 1 to 3 of 3

How can i sent sequencial ID from userform to 12 wsheets

  1. #1
    Forum Contributor
    Join Date
    04-27-2010
    Location
    Lisbon, Portugal
    MS-Off Ver
    Excel 2007
    Posts
    115

    How can i sent sequencial ID from userform to 12 wsheets

    Hi,

    Yesterday, i had an issue:my userform was sending data to a single sheet "Base Dados". In the forum i was helped and now, the data is being sent auto in to 1 of 12 sheets (months).

    This brought up a new problem. How can i define the valmax to the 12 new sheets?
    this was the code i was using:
    Please Login or Register  to view this content.
    I also have a similar problem with the protecting and unprotecting the sheets. Again, here's my actual code:
    Please Login or Register  to view this content.
    thanks in advance for all the help you can give me.

  2. #2
    Forum Expert davegugg's Avatar
    Join Date
    12-18-2008
    Location
    WI, US
    MS-Off Ver
    2010
    Posts
    1,884

    Re: How can i sent sequencial ID from userform to 12 wsheets

    Hi ncaravela

    There are a couple of things you could do in regards to the next ID number. The fast thing would be to use a cell on the Página Inicial sheet to hold the next ID number. Change the font to white and the users will not know it is there. If you don't want to risk it being changed, you could create a new sheet to hold the value, and hide it as very hidden.
    Otherwise, if you want to continue to use your code method to find the max that has been used:

    Please Login or Register  to view this content.
    For the unprotecting and protecting of sheets, you just need to identify which sheet you are unprotecting/protecting, and fill that sheet name in for Base Dados. You can use the same function:

    Please Login or Register  to view this content.
    where i will be the month number. You may need to use the date you retrieve in your cmdguardar_Click() procedure to get this i value.
    Is your code running too slowly?
    Does your workbook or database have a bunch of duplicate pieces of data?
    Have a look at this article to learn the best ways to set up your projects.
    It will save both time and effort in the long run!


    Dave

  3. #3
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: How can i sent sequencial ID from userform to 12 wsheets

    Why save to 12 sheets? Data is best entered in one sheet with a column for dates then you can use PivotTables etc
    Hope that helps.

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

    Free DataBaseForm example

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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