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: 1
Default Subscript out of ranges - Friend8899


I am new in Excel VBA program. I have recently try to write a program
in order to write the data to DBF file. I encountered Subscript out of
range. The program does not seem to detect the DBF file even I open the
file. Can someone please help. Thanks in advance for your help.


Sub Open_file()
Dim DBase_File As String
Dim Home As String
Home = ActiveWorkbook.Name
DBase_File = Sheets("Options").Range("C7")
Workbooks.Open Filename:=DBase_File
Workbooks(Home).Activate
Call Update_GL
End Sub


Sub Update_GL()
Dim TB_Rec As Long
Dim DBase_File As String
Dim Dbase_Sht As String

TB_Rec = Sheets("Options").Range("C21")
DBase_File = Sheets("Options").Range("C7")
Dbase_Sht = Sheets("Options").Range("C8")
Sheets("Payment").Activate.Range("A4:A" & TB_Rec&, "C4:C" &
TB_Rec). _
Copy
Destination:=Workbooks(DBase_File).Sheets(Dbase_Sh t).Range("A1")

End Sub


The variable defined in the Option file as follows :


LIST OF WORKBOOK TO OPEN
File name Folder
DBase_File C:\Mydocument\gltest.dbf
Dbase_Sht gltest


No. of Record 5 (TB_Rec)


--
friend8899
------------------------------------------------------------------------
friend8899's Profile: http://www.excelforum.com/member.php...o&userid=24233
View this thread: http://www.excelforum.com/showthread...hreadid=378465

 
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
subscript Bender Excel Discussion (Misc queries) 4 July 9th 09 07:45 AM
subscript Mark Subscript Excel Discussion (Misc queries) 0 March 28th 07 02:14 AM
subscript Elkar Excel Discussion (Misc queries) 0 March 27th 07 11:38 PM
Subscript out of Range Q John Excel Programming 5 December 14th 04 07:54 AM
Subscript out of range? Jason Hancock Excel Programming 3 May 26th 04 07:11 PM


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