+ Reply to Thread
Results 1 to 3 of 3

Question about the FORMAT function syntax

  1. #1
    Registered User
    Join Date
    12-24-2010
    Location
    Ohio
    MS-Off Ver
    Excel 2007
    Posts
    89

    Question about the FORMAT function syntax

    Morning

    I was wondering if when using Format ( expression, [ format ] ), could I use a variable in place of [ format ]?

    On a userform I have a checkbox indicating 2 decimal places, default would be 1 decimal place.

    Right now I have
    Please Login or Register  to view this content.
    Anyway to make

    Please Login or Register  to view this content.
    I hope I was clear in my request.

    Would appreciate any help with this problem.
    Thanks in advance.

    BTW, am using Excel 2007.

    George

  2. #2
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Question about the FORMAT function syntax

    Yes you can.

    Edit: although you need to put end sub on the last line..

  3. #3
    Registered User
    Join Date
    12-24-2010
    Location
    Ohio
    MS-Off Ver
    Excel 2007
    Posts
    89

    Re: Question about the FORMAT function syntax

    Hey yudlugar,

    Thanks for the reply.

    I had tried that code prior to posting and it didn't work.
    After reading your post I was a bit confused, but I moved the code into the calculation sub and in there it worked.

    George

+ 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. syntax question
    By beckstei in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-19-2007, 10:52 AM
  2. syntax question
    By Giselle in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-28-2006, 10:10 PM
  3. Syntax Question
    By David Godinger in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-04-2005, 08:40 AM
  4. syntax question
    By JT in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-28-2005, 04:45 PM
  5. Quick Syntax Question
    By UNOTech in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-18-2005, 01:06 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