LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
CH CH is offline
external usenet poster
 
Posts: 49
Default VBA Stops Before competing the program

Hi Guys (that refers to all of you gurus out there) !!
I have a VBA that goes as below.

The program STOPS (not break) executing at the "Workbooks.Open" line when I
assign it to short cut keys (eg Ctrl-Shift- T). There are several other
command lines yet to be executed.

It works fine if I create a command button and assign MainTouchUp() macro to
the button.
It also works fine if I go to the Visual Basic Editor and hit "F5" in the
MainTouchUp() command lines.

By the way, the MainTouchUp() and the ReadTouchUp() are in different user
modules, not sure if this affects the program.

Please help.


=========================================
Sub MainTouchUp()
...
Call ReadTouchUp(FileToOpen)
...
End Sub


Sub ReadTouchUp(FileToOpen)
Dim fs, f, s

Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.GetFile(FileToOpen)
s = f.path

Masterfile = ActiveWorkbook.Name

STOPS AT THIS POINT : Workbooks.Open FileToOpen

If Right(FileToOpen, 3) = "csv" Then
Call ReadTouchUpCSV(s)
ElseIf Right(FileToOpen, 3) = "txt" Then
Call ReadTouchUpText
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
Excel functions not available then program stops K Excel Discussion (Misc queries) 0 August 20th 09 07:49 PM
Tab Stops brentm Excel Programming 2 April 21st 05 07:20 PM
Tab stops TO Excel Programming 5 October 23rd 04 06:31 PM
Tab Stops Summer Excel Programming 1 April 29th 04 05:37 PM
merging excel program with tdc finance program judy Excel Programming 0 November 5th 03 08:01 PM


All times are GMT +1. The time now is 01:27 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"