+ Reply to Thread
Results 1 to 11 of 11

Console in Visual Basic Excel - How do i make one?

  1. #1
    Registered User
    Join Date
    05-10-2012
    Location
    Norway
    MS-Off Ver
    Excel 2010
    Posts
    39

    Console in Visual Basic Excel - How do i make one?

    Hi

    I have made a macro who creates a graph to me.
    The code look like this:

    Please Login or Register  to view this content.
    I want to make a console, just a basic one. The console is gonna ask me what function i want to run. I'd press for example Nr 3 and the console run function number 3. Then the console ask agin. Just like a loop. But i don't realy know how im gonna do the loop.


    The code above will not be a sub(). I will be a Function().
    The loop main function will be a sub()

  2. #2
    Forum Contributor
    Join Date
    10-08-2010
    Location
    Texas
    MS-Off Ver
    Excel 2010
    Posts
    386

    Re: Console in Visual Basic Excel - How do i make one?

    I can show you how to make one in UserForms, but it is a seperate pop up menu type thing. I got from your post that you are trying to do this in the sheet itself?

  3. #3
    Registered User
    Join Date
    05-10-2012
    Location
    Norway
    MS-Off Ver
    Excel 2010
    Posts
    39

    Re: Console in Visual Basic Excel - How do i make one?

    Quote Originally Posted by GaidenFocus View Post
    I can show you how to make one in UserForms, but it is a seperate pop up menu type thing. I got from your post that you are trying to do this in the sheet itself?
    Userforms is good, but to hard for me.
    But is it possible to call a "MS-dos" window and it says "hello. What do you want?" in VBA/Excel?

  4. #4
    Forum Contributor
    Join Date
    10-08-2010
    Location
    Texas
    MS-Off Ver
    Excel 2010
    Posts
    386

    Re: Console in Visual Basic Excel - How do i make one?

    You could do a MsgBox

    Please Login or Register  to view this content.

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

    Re: Console in Visual Basic Excel - How do i make one?

    Why do you think that you want a Function not a sub?
    Hope that helps.

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

    Free DataBaseForm example

  6. #6
    Registered User
    Join Date
    05-10-2012
    Location
    Norway
    MS-Off Ver
    Excel 2010
    Posts
    39

    Re: Console in Visual Basic Excel - How do i make one?

    Quote Originally Posted by GaidenFocus View Post
    You could do a MsgBox

    Please Login or Register  to view this content.
    Can i not use a console?

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

    Re: Console in Visual Basic Excel - How do i make one?

    What do you mean by a console, the only other thing would be a UserForm

  8. #8
    Registered User
    Join Date
    05-10-2012
    Location
    Norway
    MS-Off Ver
    Excel 2010
    Posts
    39

    Re: Console in Visual Basic Excel - How do i make one?

    Quote Originally Posted by royUK View Post
    What do you mean by a console, the only other thing would be a UserForm
    Are you serious?
    Don't you know what console is?

    Think about C++. Can visual basic make a popup console?

    I get debug problem when i trying to run this:
    Sub hello()
    Console.WriteLine ("Please enter a grade")
    End sub()
    Last edited by persson121; 06-30-2012 at 09:36 AM.

  9. #9
    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: Console in Visual Basic Excel - How do i make one?

    Are you serious? Don't you know what console is?
    Console is not an Excel/VBA concept; this is an Excel/VBA forum.

    You could use the InputBox function.
    Entia non sunt multiplicanda sine necessitate

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

    Re: Console in Visual Basic Excel - How do i make one?

    Answering questions with your attitude is the best way not to get help.

    If you were asking for a console in a different programming forum it would make sense. You are using VBA so are restricted to available tools, your responses to valid suggestions such as message boxes & userforms highlights your lack of knowledge.

  11. #11
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,318

    Re: Console in Visual Basic Excel - How do i make one?

    @ persson121,

    Your post does not comply with Rule 6 of our Forum RULES. Common courtesy is the order of the day.

    This is a free forum where members provide feedback to the questions you propose. If we are not entirely clear on your intended direction, please take the time to help us help you by providing clearer direction.

    Two of the members who have responded are seasoned professional on forum's like this and I would make every attempt not to alleniate the free help you are being provided.

    Please also consider adjusting your profile location to something a little more sensible.
    Last edited by jeffreybrown; 06-30-2012 at 12:31 PM.
    HTH
    Regards, Jeff

+ 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