File created with VB is hidden...why???

  • Thread starter Thread starter J Baird
  • Start date Start date
J

J Baird

I have some code that opens an Excel file, then saves it to another Excel
file, in Excel 2000.

After the program is run, whenever a user opens the new file in Excel, they
can't automatically see the file. They have to click [Window][Unhide]
select the filename, and click [OK] to display the file.

What command do I have to add ot the VB code, to make the file display
normally when a user opens it at a later date?

Notes:
- The original file's not hidden.
- This happens if I use an Excel Template file, or an Excel xls file, then
save it in vb.
 
If I were doing in Excel's VBA, I'd do something like:

Option Explicit
Sub testme()

Dim myWindow As Window
Dim Wkbk As Workbook

Set Wkbk = Workbooks("book1.xls")

For Each myWindow In Wkbk.Windows
myWindow.Visible = True
Next myWindow

End Sub

J said:
I have some code that opens an Excel file, then saves it to another Excel
file, in Excel 2000.

After the program is run, whenever a user opens the new file in Excel, they
can't automatically see the file. They have to click [Window][Unhide]
select the filename, and click [OK] to display the file.

What command do I have to add ot the VB code, to make the file display
normally when a user opens it at a later date?

Notes:
- The original file's not hidden.
- This happens if I use an Excel Template file, or an Excel xls file, then
save it in vb.
 
Back
Top