ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   sheets.select (https://www.excelbanter.com/excel-programming/346239-sheets-select.html)

kurt

sheets.select
 
Hi

I Have a funny thing
Wen I run a VBA macro with this code


Debug.Print Me.Name (
Debug the file name correct)
Debug.Print ActiveSheet.Name ( Debug
the actual sheetname correct)
Workbooks("filename.xls").Activate
Sheets("Sheet name").Select



But it dont select the new sheet (sheet name) ??
It doesent either work with Windows("filename.xls").Activate

I am using windows 2000 and excell 2003

Anyone have an Idea??


regards

Kurt


Mike Fogleman

sheets.select
 
My first guess would be either the sheet is not visible, or screenupdating
is off, or both. Try:

Sheets("Sheet name").Select
ActiveSheet.Visible = True
'and/or
Application.ScreenUpdating = True

Mike F
"kurt" wrote in message
ups.com...
Hi

I Have a funny thing
Wen I run a VBA macro with this code


Debug.Print Me.Name (
Debug the file name correct)
Debug.Print ActiveSheet.Name ( Debug
the actual sheetname correct)
Workbooks("filename.xls").Activate
Sheets("Sheet name").Select



But it dont select the new sheet (sheet name) ??
It doesent either work with Windows("filename.xls").Activate

I am using windows 2000 and excell 2003

Anyone have an Idea??


regards

Kurt




kurt

sheets.select
 

Mike Fogleman skrev:

My first guess would be either the sheet is not visible, or screenupdating
is off, or both. Try:

Sheets("Sheet name").Select
ActiveSheet.Visible = True
'and/or
Application.ScreenUpdating = True

Mike F
"kurt" wrote in message
ups.com...
Hi

I Have a funny thing
Wen I run a VBA macro with this code


Debug.Print Me.Name (
Debug the file name correct)
Debug.Print ActiveSheet.Name ( Debug
the actual sheetname correct)
Workbooks("filename.xls").Activate
Sheets("Sheet name").Select



But it dont select the new sheet (sheet name) ??
It doesent either work with Windows("filename.xls").Activate

I am using windows 2000 and excell 2003

Anyone have an Idea??


regards

Kurt




All times are GMT +1. The time now is 02:18 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com