View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
carmen carmen is offline
external usenet poster
 
Posts: 27
Default From variable to excel constant

In an excel sheet I'm allowing users to pick from dropdown whether they want
to print in xlPortrait or xlLandscape. It's not feasible to go directly to
Page setup because this page setup that we are applying is for another file.

However, when I read this choice to a variable and setting
pagesetup.orientation to this variable, it doesn't recognize it. This is
because xlPortrait should not be a text, but a constant.

Is there a formula to convert the string to constant? I must allow user to
do the selection in the worksheet.

Thanks,
Carmen