Please could you check this line of code

ipbr21054

Well-known Member
Joined
Nov 16, 2010
Messages
5,227
Office Version
  1. 2007
Platform
  1. Windows
Morning,
I am stuck with the correct way of adding the cell for my PDF to be generated.

I have two options in my code.

This which works fine.
Rich (BB code):
MsgBox "GENERATED PDF " & Range("G13").Value & vbNewLine & vbNewLine & " WAS NOT SAVED AS IT ALLREADY EXISTS", vbCritical + vbOKOnly, "GENERATE PDF FILE MESSAGE"

But trying to get the cell G13 to work in this line if causing me an issue for some reason.

This works if i dont apply G13

Rich (BB code):
pdf = MsgBox("GENERATED PDF " & " WAS SAVED SUCCESSFULLY" & vbNewLine & vbNewLine & "DO YOU WISH TO NOW PRINT IT ?", vbExclamation + vbYesNo, "GENERATE PDF FILE MESSAGE")

But my attempt keeps telling me required list separator or )

Rich (BB code):
pdf = MsgBox("GENERATED PDF " & Range("G13").Value " & " WAS SAVED SUCCESSFULLY" & vbNewLine & vbNewLine & "DO YOU WISH TO NOW PRINT IT ?", vbExclamation + vbYesNo, "GENERATE PDF FILE MESSAGE")
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
pdf = MsgBox("GENERATED PDF " & Range("G13").Value " & " WAS SAVED SUCCESSFULLY" & vbNewLine & vbNewLine & "DO YOU WISH TO NOW PRINT IT ?", vbExclamation + vbYesNo, "GENERATE PDF FILE MESSAGE")

delete the speech mark I have made bold, red underlined and try it
 
Upvote 0
Many thanks just worked fine.

I get confused when it sai put ) but didnt noticed that something had to be added etc
 
Upvote 0

Forum statistics

Threads
1,215,461
Messages
6,124,954
Members
449,198
Latest member
MhammadishaqKhan

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top