473,326 Members | 2,182 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

plzz remove error

Plz check error in line no. 13.here give me error that
Error :- Run Time Error : '424'
Object required
plz check it these code wriiten in visual basic6.0
plz anyone help me


1. Private Declare Function ShellExecute Lib "shell32.dll" _
2. Alias "ShellExecuteA" (ByVal Hwnd As Long, _
3. ByVal lpOperation As String, ByVal lpFile As String, _
4. ByVal lpParameters As String, _
5. ByVal lpDirectory As String, _
6. ByVal nShowCmd As Long) As Long


7. Public Function OpenLocation(ByVal WhichFilePath As String, Optional sParams As String = "", Optional sStartIn As String = vbNullString, Optional lngOpenMode As Long = 1) As Long
8. OpenLocation = ShellExecute(0, "Open", WhichFilePath, sParams, sStartIn, lngOpenMode)
9. End Function


11. Private Sub cmd_bal_Click()
12. Dim A1C1Val As String
13. A1C1Val = CStr(Application.Sheets("d:\s\Book2.xls").Range("I 6").Value)
14. Text1.Text = A1C1Val
15. End Sub
Feb 9 '07 #1
1 1006
Killer42
8,435 Expert 8TB
Plz check error in line no. 13.here give me error that
Error :- Run Time Error : '424'
Object required
...
12. Dim A1C1Val As String
13. A1C1Val = CStr(Application.Sheets("d:\s\Book2.xls").Range("I 6").Value)
14. Text1.Text = A1C1Val
The Sheets collection returns all of the worksheets in a specified workbook. I'm almost certain you need to open the workbook first (that would be "d:\s\Book2.xls"). Then you would use the Sheets collection to access, for example, "Sheet1".
Feb 10 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: charismatic_evangelist | last post by:
I am trying to write a Windows Service in C# .NET Version 1.1. I followed Microsoft's directions: ...
1
by: aj | last post by:
plzz help me to add How a Blank row in a datagrid without using dataset or any other. plzzz help me
1
by: Robin Patra | last post by:
Hi , I am getting the following error when i moved my application from one machine to other.. Visual Studio .NET cannot create or open the application. The likeliest problem is that required...
1
by: silverburgh.meryl | last post by:
Hi, I have this piece of code which calls STL remove(): _aList.erase(remove(_aList.begin(), _aList.end(), bd), _aList.end()); where _aList is a 'vector<A*>' and bd is 'A*' But i get this...
3
by: craigbennett | last post by:
Hi, I am trying to use std::remove to delete a file and have been encountering some problems. My goal is to pass std::remove a std::string and remove the file of that name, for example. ...
40
by: dev_cool | last post by:
hello everybody, i'm a new member of this group, this is my first ever post. i've found a c program that prints prime numbers through an infinite loop. But I really don't understand the code....
5
by: irin07 | last post by:
hello... i just learn how to use php,can anyone help me about how to edit database using php,plzz....i need urgently and i really blank about this. this the database dbhelpdesk table...
1
by: zrtv | last post by:
hi All, Iam new in oracle stored procedure, i have one stored procedure and it has to be accessed from vb6. my stored procedure as follows -- employee salary will be entered by the user and...
3
by: ABOD | last post by:
hi all...plzz..help me to solve this Q. write a multithreading program to multiply ttwo matrices M and N. The two matrices may have differnrt size. M is (r*w) and N is(w*z) The result is a r*z...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.