LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22
Default How to open file in the background. It is possible?


I would like to open file, but I do not want to people saw this.

I have a code:

Private Sub Worksheet_Change(ByVal Target As Range)
Dim szukana As Range
Dim Cecha As String
Dim bk As Workbook
Dim sh As Worksheet
Dim sh1 As Worksheet

If Not Application.Intersect(Columns("A:A"), Target) _
Is Nothing Then
Cecha = Target.Value

If Cecha = "" Then Exit Sub
On Error Resume Next
Set bk = Workbooks(p1.xls)
On Error GoTo 0
If bk Is Nothing Then
Set bk = Workbooks.Open(Filename:="H:\....p1.xls")
End If

Set sh1 = bk.Worksheets(bk.Worksheets.Count)
For Each sh In bk.Worksheets
Set szukana = sh.Cells.Find(What:=Cecha, _
After:=ActiveCell, LookIn:=xlFormulas, _
LookAt:=xlPart, SearchOrder:=xlByColumns, _
SearchDirection:=xlNext, MatchCase:=False, _
SearchFormat:=False)
If szukana Is Nothing Then
If sh.Name = sh1.Name Then
MsgBox "Sorry, but " & Cecha & " was not found"
ActiveWorkbook.Close
Target.Value = ""

End If
Else
bk.Activate
sh.Activate
szukana.Activate
MsgBox "Szukana cecha " & Cecha & " was found"
ActiveWorkbook.Close

End If
Next sh

End If

End Sub




 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Open EXCEL.exe in Background using a .BAT File Sunil Excel Discussion (Misc queries) 0 June 17th 09 11:49 AM
I don't want to see the background page #s when a .xls is open jwade Setting up and Configuration of Excel 2 August 17th 06 09:30 PM
Excel does not open, just opens a the grey background Steve New Users to Excel 2 May 17th 06 03:00 AM
strange problem: excel file does not open and background freezes i EdH Excel Discussion (Misc queries) 2 April 21st 06 02:00 AM
How to open file in the background. It is possible? Andrzej New Users to Excel 1 May 31st 05 10:46 PM


All times are GMT +1. The time now is 03:07 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"