Results 1 to 5 of 5

Auto Serial number

Threaded View

  1. #1
    Registered User
    Join Date
    08-28-2016
    Location
    Gondia
    MS-Off Ver
    m s office 10
    Posts
    8

    Auto Serial number

    Haiiii,

    i have created an userform for my basic requirement ... and i am able to create a code for auto generated Serial Number for the same (eg. 001...) but i want to change the serial numbers in other form eg. "C-001" as i have crated 3 userforms and want unique serial number for respective user form. initially the same working fine but when i have made an amendments in my code for unique serial number , it is not working properly as everytimes i'm getting the same serial number.

    Code:
    Dim answer As Integer
    Dim counting As String
    answer = MsgBox("Are you sure you want to save?", vbYesNo + vbQuestion, "Save Sheet")
    If answer = vbYes Then
        Dim lastrow As Long
        Range("A2").Select
        lastrow = Sheets("Sheet1").Cells(Rows.Count, 1).End(xlUp).Row
        counting = "C" & Format(Val(Sheets("Sheet1").Cells(Rows.Count, 1).End(xlUp)) + 1, "00000")
        textSrNumber = counting
        Sheets("Sheet1").Cells(lastrow + 1, 1).Value = textSrNumber.Text
    Please help / suggest.
    Regards,
    Last edited by FDibbins; 10-14-2016 at 01:35 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Auto Serial Number Using VBA
    By LoveCandle in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-21-2022, 09:24 PM
  2. [SOLVED] Auto Populate Serial Number From Total number
    By sanju2323 in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 08-04-2015, 04:33 PM
  3. Auto generate serial number
    By silambarasan.J in forum Excel General
    Replies: 2
    Last Post: 01-31-2015, 12:46 PM
  4. Auto generate serial number
    By silambarasan.J in forum Excel General
    Replies: 3
    Last Post: 01-31-2015, 08:33 AM
  5. Auto Serial Number
    By MdYas in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-23-2014, 08:19 AM
  6. Shortcyt key for auto serial number
    By dingdang in forum Excel General
    Replies: 1
    Last Post: 07-16-2013, 02:17 AM
  7. Auto Fill the serial Number
    By anwitha in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 10-23-2010, 02:11 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