Excel using VB - save problem

S

Stephen Plotnick

Background.

I've written many programs in VB2008 creating and reading excel spreadsheets
(office 2007)
All program written before were using "Console Application"

My problem.
Program written as Windows Form
Open spreadsheet and populate fields in a form
User can change values in form
Save those values back into same cells in spreadsheet
Save spreadsheet

I get the values into the form
I execute the save command with the new values
I can rerun vb program and get the new values without any problems


My problem.
If I open the saved spreadsheet in Excel I do not see anything not even the
name shows up on the title bar. It is as if Excel never opens up the
spreadsheet. The file size is the same as before manipulating the data and
like I said I can rerun my VB program and get the fields without any issues.

I also tried doing a saveas to another spreadsheet and have the same issue
opening it up.

I also tried converting from 2007 to 2003 format both for input and output
with the same issues.

Thanks in advance,
Steve
 
B

Barb Reinhardt

I've run into issues in Excel 2007 if I don't include the FileFormat
specification in the VB code t save. Might that be your problem?

HTH,
Barb Reinhardt
 
S

Stephen Plotnick

I do use the file format for the saveas to go back to Excel 2003.

I have the same issues reading that file afterwards as I do with the
original one.

Thanks,
Steve
 
H

Homey

workbook hidden? is it in list after Unhide used on View tab Window section
in excel 2007?


|I do use the file format for the saveas to go back to Excel 2003.
|
| I have the same issues reading that file afterwards as I do with the
| original one.
|
| Thanks,
| Steve
|
|
message
| | > I've run into issues in Excel 2007 if I don't include the FileFormat
| > specification in the VB code t save. Might that be your problem?
| >
| > HTH,
| > Barb Reinhardt
| >
| > "Stephen Plotnick" wrote:
| >
| >> Background.
| >>
| >> I've written many programs in VB2008 creating and reading excel
| >> spreadsheets
| >> (office 2007)
| >> All program written before were using "Console Application"
| >>
| >> My problem.
| >> Program written as Windows Form
| >> Open spreadsheet and populate fields in a form
| >> User can change values in form
| >> Save those values back into same cells in spreadsheet
| >> Save spreadsheet
| >>
| >> I get the values into the form
| >> I execute the save command with the new values
| >> I can rerun vb program and get the new values without any problems
| >>
| >>
| >> My problem.
| >> If I open the saved spreadsheet in Excel I do not see anything not even
| >> the
| >> name shows up on the title bar. It is as if Excel never opens up the
| >> spreadsheet. The file size is the same as before manipulating the data
| >> and
| >> like I said I can rerun my VB program and get the fields without any
| >> issues.
| >>
| >> I also tried doing a saveas to another spreadsheet and have the same
| >> issue
| >> opening it up.
| >>
| >> I also tried converting from 2007 to 2003 format both for input and
| >> output
| >> with the same issues.
| >>
| >> Thanks in advance,
| >> Steve
| >>
| >>
| >>
|
 
S

Stephen Plotnick

Boy are you smart. That did the trick from within Excel.

Is there a way for me to make that happen within my VB program before I save
the spreadsheet so that I can just call it up in Excel.

Thanks for the great help,
Steve
 
H

Homey

Workbooks("Workbookname.xls").Windows(1).visible=true or

WB.Windows(1).visible=true if you have WB set to the workbook.



| Boy are you smart. That did the trick from within Excel.
|
| Is there a way for me to make that happen within my VB program before I
save
| the spreadsheet so that I can just call it up in Excel.
|
| Thanks for the great help,
| Steve
| "Homey" <none> wrote in message
| | > workbook hidden? is it in list after Unhide used on View tab Window
| > section
| > in excel 2007?
| >
| >
| > | > |I do use the file format for the saveas to go back to Excel 2003.
| > |
| > | I have the same issues reading that file afterwards as I do with the
| > | original one.
| > |
| > | Thanks,
| > | Steve
| > |
| > |
| > message
| > | | > | > I've run into issues in Excel 2007 if I don't include the FileFormat
| > | > specification in the VB code t save. Might that be your problem?
| > | >
| > | > HTH,
| > | > Barb Reinhardt
| > | >
| > | > "Stephen Plotnick" wrote:
| > | >
| > | >> Background.
| > | >>
| > | >> I've written many programs in VB2008 creating and reading excel
| > | >> spreadsheets
| > | >> (office 2007)
| > | >> All program written before were using "Console Application"
| > | >>
| > | >> My problem.
| > | >> Program written as Windows Form
| > | >> Open spreadsheet and populate fields in a form
| > | >> User can change values in form
| > | >> Save those values back into same cells in spreadsheet
| > | >> Save spreadsheet
| > | >>
| > | >> I get the values into the form
| > | >> I execute the save command with the new values
| > | >> I can rerun vb program and get the new values without any problems
| > | >>
| > | >>
| > | >> My problem.
| > | >> If I open the saved spreadsheet in Excel I do not see anything not
| > even
| > | >> the
| > | >> name shows up on the title bar. It is as if Excel never opens up
the
| > | >> spreadsheet. The file size is the same as before manipulating the
| > data
| > | >> and
| > | >> like I said I can rerun my VB program and get the fields without
any
| > | >> issues.
| > | >>
| > | >> I also tried doing a saveas to another spreadsheet and have the
same
| > | >> issue
| > | >> opening it up.
| > | >>
| > | >> I also tried converting from 2007 to 2003 format both for input and
| > | >> output
| > | >> with the same issues.
| > | >>
| > | >> Thanks in advance,
| > | >> Steve
| > | >>
| > | >>
| > | >>
| > |
| >
|
 
S

Stephen Plotnick

Thanks,

That did the trick.

Steve
Homey said:
Workbooks("Workbookname.xls").Windows(1).visible=true or

WB.Windows(1).visible=true if you have WB set to the workbook.



| Boy are you smart. That did the trick from within Excel.
|
| Is there a way for me to make that happen within my VB program before I
save
| the spreadsheet so that I can just call it up in Excel.
|
| Thanks for the great help,
| Steve
| "Homey" <none> wrote in message
| | > workbook hidden? is it in list after Unhide used on View tab Window
| > section
| > in excel 2007?
| >
| >
| > | > |I do use the file format for the saveas to go back to Excel 2003.
| > |
| > | I have the same issues reading that file afterwards as I do with the
| > | original one.
| > |
| > | Thanks,
| > | Steve
| > |
| > |
| > message
| > | | > | > I've run into issues in Excel 2007 if I don't include the
FileFormat
| > | > specification in the VB code t save. Might that be your
problem?
| > | >
| > | > HTH,
| > | > Barb Reinhardt
| > | >
| > | > "Stephen Plotnick" wrote:
| > | >
| > | >> Background.
| > | >>
| > | >> I've written many programs in VB2008 creating and reading excel
| > | >> spreadsheets
| > | >> (office 2007)
| > | >> All program written before were using "Console Application"
| > | >>
| > | >> My problem.
| > | >> Program written as Windows Form
| > | >> Open spreadsheet and populate fields in a form
| > | >> User can change values in form
| > | >> Save those values back into same cells in spreadsheet
| > | >> Save spreadsheet
| > | >>
| > | >> I get the values into the form
| > | >> I execute the save command with the new values
| > | >> I can rerun vb program and get the new values without any
problems
| > | >>
| > | >>
| > | >> My problem.
| > | >> If I open the saved spreadsheet in Excel I do not see anything
not
| > even
| > | >> the
| > | >> name shows up on the title bar. It is as if Excel never opens up
the
| > | >> spreadsheet. The file size is the same as before manipulating the
| > data
| > | >> and
| > | >> like I said I can rerun my VB program and get the fields without
any
| > | >> issues.
| > | >>
| > | >> I also tried doing a saveas to another spreadsheet and have the
same
| > | >> issue
| > | >> opening it up.
| > | >>
| > | >> I also tried converting from 2007 to 2003 format both for input
and
| > | >> output
| > | >> with the same issues.
| > | >>
| > | >> Thanks in advance,
| > | >> Steve
| > | >>
| > | >>
| > | >>
| > |
| >
|
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top