Results 1 to 5 of 5

Adding Code to an Existing UserForm with VBA

Threaded View

  1. #1
    Forum Contributor
    Join Date
    02-14-2007
    Location
    Chester, England
    MS-Off Ver
    2010 & 2016
    Posts
    312

    Adding Code to an Existing UserForm with VBA

    Hello All

    I hope someone can help me.

    Is it possible to add some code to an existing UserFrom with VBA only?

    I have around 50 spreadsheets that are being used by employees to record their work. I have now written a script to make some adjustments to these sheets and update them. The intention is that I will send out a sheet with a macro that will adjust and update their time sheet for them.

    The script now does almost everything I want it to, however I would like to be able to add the following code to an existing UserForm in the workbook called "NewSheet"

    Private Sub UserForm_Initialize()
       Me.Year.Value = ThisWorkbook.Sheets("Sheet1").Range("N15").Value
    End Sub
    Sorry for the long winded description but I wanted to explain why I want to make this seeming minor change through VBA.

    Thanks in advance for any help you can provide.

    Cheers

    Jim
    Last edited by JimmyA; 04-08-2010 at 09:42 AM.

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