PDA

View Full Version : [SOLVED:] How to show percentages from multiple cells in the caption for one.. userform button



gringo287
04-25-2014, 04:20 AM
Hi,

I've created a very simple userform to monitor certain stats for a call centre. The mock example I've attached will explain better, but essentially I want the percentages from multiple cells to show as the caption for the command button. Its very simple for numbers, but I cant make it work with the percentages. I've done similar tasks with single cell percentages, but it all goes belly up when I try to be "Clever".

snb
04-25-2014, 07:26 AM
Private Sub UserForm_Initialize()
CmdVbax.Caption = FormatPercent(ThisWorkbook.Sheets("sheet1").Range("J8").Value) & vbTab & FormatPercent(ThisWorkbook.Sheets("sheet1").Range("L8").Value)
End Sub

gringo287
04-26-2014, 12:59 AM
Snb, I salute you!. Thank you very much.