View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default save userform as image

Why not try it with a simple name and get it working - then you can expand
from there.

A subscript out of range would probably mean there is no sheet with the name
NameSSN. perhaps that is a variable and you really want

Worksheets(NameSSN) where previously you did something like NameSSN
= "Sheet1" as an example.
--
Regards,
Tom Ogilvy

"BigPig" wrote in message
...
Hi Tom,

Thanks for the code.

I tried it and it worked as you mentioned. At the bottom of the code I
included a statement to save the workbook as etc... but it didn't work.
(susbscript out of range)Do you have any ideas? Here is the code that I
put
at the bottom of what you sent:


ActiveWorkbook.SaveAs "C:\Documents and
Settings\myname\Desktop\OER_info_mail_out" & "\" & "OER Info " &
frmQV1.ComboBox1.Value & " " & Worksheets("NameSSN").Range("r1") & ".xls"
ActiveWorkbook.Close SaveChanges:=False

BTW Combobox1.value is a person's name and range("r1") is today's date
formatted as yymmdd.