473,386 Members | 1,712 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,386 software developers and data experts.

File DialogBox to Import Spreadsheet

Hi,

I need the exact same thing that is..import excel sheets to access but having the option of browsing for the excel sheet i want to import.

I tried out the code you have mentioned above and it is showing a compilation error at Me.tb_FileName = strFilePath.

It highlights .tb_FileName and says "Method or Data member not found"

Do I need to give reference library for this command? Or do I need to change something of text box on the form which is supposed to display the file path?

Please help me out

** Edit **
This thread was originally posted into Use a button to open a File dialog box to import a Excel spreadsheet
Jul 13 '10 #1
9 3340
jimatqsi
1,271 Expert 1GB
You mean to use Me! instead of Me.
Expand|Select|Wrap|Line Numbers
  1. Me!tb_FileName = strFilePath
Jim
Jul 13 '10 #2
@jimatqsi
Hi Jim,

I tried to replace Me. with Me! but now it says 'invalid use of the keyword Me' while compilation
Jul 13 '10 #3
NeoPa
32,556 Expert Mod 16PB
Do you actually have a control called [tb_FileName] on your form?

By the way, either Me. or Me! works fine. There are discussions as to which is recommended and for what reasons, but they are entirely irrelevant in this instance.
Jul 13 '10 #4
@NeoPa
Yes..I have a text box I named tb_FileName Still it shows compilation error: Invalid use of Keyword Me
Jul 14 '10 #5
TheSmileyCoder
2,322 Expert Mod 2GB
Have you added the code to a module that is bound to a form, or to a independent module?

The invalid reference to me. sounds as if you have tried to put the code in a seperate module.
Jul 14 '10 #6
That was it! I had put the code in a separate module..Sorry I am a complete beginner.
Thanks a lot!! Its working out just fine now :)
Jul 14 '10 #7
TheSmileyCoder
2,322 Expert Mod 2GB
We all start somewhere. Glad to be of assistance!
Jul 14 '10 #8
NeoPa
32,556 Expert Mod 16PB
No need to apologise.

These things seem obvious to us, but only because of the experience we already have. Without that, we wouldn't have the understanding of such Office-specific concepts. Scope is an issue that has caused people to struggle for many years.
Jul 14 '10 #9
@NeoPa
Its amazing how you guys figure out stuff without actually having a look at it.
Respekt! And Thanks once again
Jul 14 '10 #10

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

Similar topics

1
by: Chris | last post by:
Background: I am using a MS Access 2000 front end with SQL Server 8.0 back end. I have the requirement to import all text files (regardless of filename) from a given folder on the network into a...
1
by: Jer | last post by:
Using an access project front-end to an MSDE database, I'm trying to import a spreadsheet using File->Get External Data->Import. After I select the spreadsheet name, I tell it I want to import into...
1
by: Mark | last post by:
Hi All, Sorry if this is a basic question but I can't get this to work. I have files randomly FTP'd to a directory and I need to import them. That I can do but what I can't do is move them once...
3
by: Anders | last post by:
Hi, This is the code I am using: string filepath = "Themes/img/logo.rar"; string filename = System.IO.Path.GetFileName(filepath); Response.Clear(); Response.ContentType = "application/zip";
0
by: Jer | last post by:
I am using TransferSpreadsheet from an ADP file to import an Excel spreadsheet into an MSDE database. On one computer, when I run the code to import the spreadsheet, it prompts for an SQLServer...
0
by: Diddley | last post by:
I want to import a large number of Excel spreadsheets that are 'supposed' to have the same number of columns representaing the same type of data into tables in an Access database. The UNC path and...
1
by: Devilxpto | last post by:
I need help on how to import a Flat file source into SQL database, but the name of the file (part of the name) changes everyday. How can I create a method to import the file everyday into a new table...
2
by: solargovind | last post by:
Hi, Can anybody suggest me how to take data from an Excel file without import into Access as a Table..? Bcoz...I hve several file. if i import, it would take more time and increase the file...
9
by: Quiver | last post by:
Is there a way to have the user choose what file to import, but set everything else up in VBA? The command button that would start the import would have something like this -- ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.