Variable as percent

  • Thread starter Thread starter James C.
  • Start date Start date
J

James C.

Hi everyone,

I have a button that my users can push that will display a message box that
is linked to a cell with a percent value in it. My problem is that when the
user presses the button the msgbox say:

The value of column x is: .158765224

I want this to say, " The value of column x is 15.8%" but i don't know how
to declare my variable properly to do so.

Any help would be appreciated.
 
You can do it in the message box response:

MsgBox "The value of column x is " & Format(LinkedCell, "00.0%")

If you only want whole percentage then make it "00%". Substitute the actual
cell reference for LinkedCell.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top