View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Kevin B Kevin B is offline
external usenet poster
 
Posts: 1,316
Default Problem in Msgbox()

You could declare a string variable and then build your message incrementally:

Dim strMsg as string

strMsg = "Trading Interest (Client) : " & financing_total & vbCrLf
strMsg = strMsg & vbCrLf & corp_action & vbCrLf & vbCrLf &
strMsg = strMsg & "CFD Dividend Received : "

and continue building the message until complete

Then your msgbox statement would be

s = MsgBox(strMsg, vbOKOnly, "Please Note Down
financial Figur for Today")


Kevin Backmann


"ashish128" wrote:

Hi All,

I am facing a problem in Msgbox() function. I dont know if the problem
is caused by a limitation of msgbox or of Excel itself but I cant
figure it out.

Following is the exact (single) line of code I am using.

s = MsgBox("Trading Interest (Client) : " & financing_total & vbCrLf &
vbCrLf & corp_action & vbCrLf & vbCrLf & "CFD Dividend Received : " &
cfd_interest & vbCrLf & vbCrLf & "Equity Interest Received : " &
equity_interest & vbCrLf & vbCrLf & "Tax Amount : " & tax & vbCrLf &
" Purchase / Sale <<<<<<<<<<<<<<" & vbCrLf & vbCrLf &
" Equity ECU Equity S. Krona Equity
CHF" & vbCrLf & " (L:16, L:17) (O:16, O:
17) (Q:16, Q:17)" & vbCrLf & vbCrLf & "Purchase : " &
equity_eur_purchase_total & " " & equity_sek_purchase_total & " " &
equity_chf_purchase_total & vbCrLf & vbCrLf & "Sales : " &
equity_eur_sale_total & " " & equity_sek_sale_total & " " &
equity_chf_sale_total & vbCrLf & " Transfer to Future / Forex
<<<<<<<<<" & vbCrLf & "MS Equity ECU : " &
equity_transfer_to_future_forex_AC_EUR & " MS SWAP GBP1 : " &
Swap_transfer_to_future_forex_AC_GBP, vbOKOnly, "Please Note Down
financial Figur for Today")



I just want to add more spaces (and text) in between the message but
excel is not allowing me to add anything more in this line.

Is there a way to overcome this situation?

Please Help.

With Regards

Ashish Sharma