+ Reply to Thread
Results 1 to 4 of 4

Populate Pre-Defined text

  1. #1
    Registered User
    Join Date
    02-28-2014
    Location
    Dubai
    MS-Off Ver
    Excel 2013
    Posts
    19

    Post Populate Pre-Defined text

    Hi,

    I want to populate my predefined text in certain cells of Sheet2 by click on RadioButton1 which is located on Sheet1.
    Kindly help me out with or any your code

    Private Sub BasicButton1_Click()

    Sheets("Sheet2").Range("A14").Select
    ActiveCell.Value = 11


    Sheets("Sheet2").Range("A20").Select
    ActiveCell.Value = "San Diago"

    Sheet("Sheet2").Range("A21").Select
    ActiveCell.Value = "New York/San Diago - Brooklyn"

    End Sub

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,464

    Re: Populate Pre-Defined text

    Please use Code Tags in your posts

    Please Login or Register  to view this content.

    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    02-28-2014
    Location
    Dubai
    MS-Off Ver
    Excel 2013
    Posts
    19

    Re: Populate Pre-Defined text

    i tried your code and it works fine but when I incorporate below two lines it gives Application defined or object defined error.

    underline code is for Sheet1


    Private Sub BasicButton1_Click()

    ActiveSheet.Shapes.Range(Array("GroupPlan")).Visible = False
    Rows("17:24").EntireRow.Hidden = True

    With Sheets("Sheet2")
    .Range("A14").Value = 11
    .Range("A20").Value = "San Diago"
    .Range("A21").Value = "New York/San Diago - Brooklyn"
    End With
    End Sub[/CODE]
    Last edited by crimzon; 03-18-2014 at 12:26 PM.

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,464

    Re: Populate Pre-Defined text

    i tried your code and it works fine
    Then your question has been answered and this is a new question.

    new question, new thread.

    Please mark this as solved and start a new thread. Link to this one of you think it provides some background. Suggest you upload a sample workbook in the new thread.


    If you are satisfied with the solution(s) provided, please mark your thread as Solved.


    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save


    You may also want to consider thanking those people who helped you by clicking on the little star at the bottom left of their reply to your question.

+ 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. [SOLVED] Populate list of user defined codes with checked data
    By johnmarkp in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-08-2013, 04:02 PM
  2. In UserForm, how to populate a ComboBox/ListBox with a Range, defined by....
    By johnw993 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-07-2012, 11:06 PM
  3. [SOLVED] Macro to add defined text to the end of multiple defined columns of data
    By spikedog in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-28-2012, 05:10 AM
  4. Using VBA to populate cells with formulas containing user-defined functions
    By Chinchin in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 08-29-2011, 12:26 PM
  5. Auto populate value already pre-defined
    By thongtran in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-30-2008, 03:48 PM

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