+ Reply to Thread
Results 1 to 8 of 8

Create a Square Shape Based on User Inputs

  1. #1
    Registered User
    Join Date
    10-15-2011
    Location
    New Zealand
    MS-Off Ver
    Excel 2003
    Posts
    3

    Create a Square Shape Based on User Inputs

    Im trying to write this code for this project i am working on and need help with the code.

    What im tasked to do is as follows:

    Write an application that displays a solid square composed of a character input by the user.
    The user should also input the size.

    A) Write a sub procedure DisplaySquare to display the solid square. The size should be specified by the integer parameter intSize. The character that fills the square should be specified by the string parameter strFillCharacte. You should use a For...Next statement nested within another For...Next statement to create the square. The outer For...Next specifies what row is currently being displayed. THe inner For...Next appends all the characters that form a row to a display string.

    B) Double click the Display Square Button to create the event handler. Program the event handler to call procedure DisplaySquare.


    Using VBA really need help with the code, havnt got anything so far duont even know where to start.

    Help would be greatly appreciated

    How do i add pictures to my post? ill upload a picture of what the form should look like

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    re: Create a Square Shape Based on User Inputs

    Hello stensonnz,

    Welcome to the Forum!

    To Attach a File:
    1. Scroll down to the window below your post Additional Options
    2. In the frame Attach Files you will see the button Manage Attachments
    3. Click the button.
    4. A new window will open titled Manage Attachments - Excel Forum.
    5. Click the Browse... button to locate your file for uploading.
    6. This will open a new window File Upload.
    7. Once you have located the file to upload click the Open button. This window will close.
    8. You are now back in the Manage Attachments - Excel Forum window.
    9. Click the Upload button and wait until the file has uploaded.
    10. Close the window and then click Submit.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Create a Square Shape Based on User Inputs

    Hello stensonnz,

    I changed your title to better match your request.

  4. #4
    Registered User
    Join Date
    10-15-2011
    Location
    New Zealand
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Create a Square Shape Based on User Inputs

    Similar to this picture

  5. #5
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: Create a Square Shape Based on User Inputs

    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  6. #6
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Create a Square Shape Based on User Inputs

    We don't do homework, but if you have a narrow and specific question, we may be able to help.
    Entia non sunt multiplicanda sine necessitate

  7. #7
    Registered User
    Join Date
    10-15-2011
    Location
    New Zealand
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Create a Square Shape Based on User Inputs

    Its not a project, i wrote out the instructions myself wanting to give it to kids in my class to try and do

  8. #8
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Create a Square Shape Based on User Inputs

    Anyone for a slice of humble pie?

+ 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