Hi
I'm using the following macro to show what is in a cell
How would I add a couple of spaces between the last word and the number?
And is there a way to change the font?
Sub lastnumber() MsgBox " Last Check Number" & Range("k1") End Sub
mike
Hi
I'm using the following macro to show what is in a cell
How would I add a couple of spaces between the last word and the number?
And is there a way to change the font?
Sub lastnumber() MsgBox " Last Check Number" & Range("k1") End Sub
mike
Hi Mike
Changing the font is not worth the effort cause you will have to change system settingsSub lastnumber() MsgBox " Last Check Number" & " " & Range("k1") End Sub
could use a userForm then you change what you want.
thanks Rob342
That's the one thing I didn't try.
Thank you
I diffidently don't want to try to change any system settings.
Mike
Hi selfteaching!
Not sure what you want.
MsgBox " Last Check Number " & Range("k1")
You didn't try either:
Sub M_snb() MsgBox space(10)& "Last Check Number" & Space(15)& Range("k1") End Sub
Hi snb
I tried adding spaces btw the last" and &
I aslo tried adding spaces btw & and Range
I didn't think to add spaces after the last " and add another one
I didn't see 大灰狼1976 answer till after I thanked Rob342
After I read 大灰狼1976 answer, Which I tried before, I noticed that I didn't mark the thread solved.
I then forgot to thank 大灰狼1976 for responding
I also like your way...which I just tried
Sorry if I offended
mike
And you didn't try either:
MsgBox String(10, " ") & "Last Check Number" & String(15, " ") & Range("k1") MsgBox Application.Rept(" ", 10) & "Last Check Number" & Application.Rept(" ", 15) & Range("k1") MsgBox Space(10) & "Last Check Number" & Format(Range("k1"), " 0") 'if cell K1 is an integer
Last edited by 大灰狼1976; 03-21-2019 at 12:43 AM.
A quick search has shown that HansV an Excel MVP has suggested that the font and style of text in a messagebox is set by your excel preferences, however he did suggest that you might try creating your own dialogue box as an alternative See here https://answers.microsoft.com/en-us/...0-8bb604e6c6f4
Remember To Do the Following....
Use [Code].... [/Code] tags when posting code to the thread.
Mark your thread as Solved if satisfied by using the Thread Tools options.
If posting the same issue to another forum please show the link