Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




Excel Sheet As Data Entry Grid On Form


Is it possible to put (and manipulate) an Excel sheet on form to use as an user entry grid for data? If so, how?

I want to limit the columns that are viewable (6), resize columns, & put labels in row 1, hide the column & row headers, etc. In effect, I'd like to visually have a plan grid to allow the user to enter information for as many rows as necessary.

Initially, I tried using a DBGrid (with no data source) but I could not find a way to allow me to activate the 'New Record' row even with AllowAddNew = True.

So, I've put an OLE container control with an Excel sheet on my form. However, I can't figure out how to get to the sheet to do the above things in code.

Can anyone give me some ideas (either on the Excel method, the DBGrid method, or some other method of grid input? Please!!!
Thanks,
Nate




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Copying/Pasting Data From Flex Grid To Excel Sheet
How can I copy data from flex grid and paste it to excel sheet and also vice-versa.

Ali.

Start Excel Wrksht In Data Entry Form Mode
Hi and Thanks in advance for you help.
How do you start an Excel Worksheet in Data Entry Form Mode. What is the control name?

Moving Form Data Into Excel Sheet
I have an Excel spreadsheet with some colum headers and VB form with some text boxes for a user to enter in data. How do I format the data they enter to fit into my spreadsheet? And then how do I actually move the data from the form to the spreadsheet?

Thanks
-Zoeith

Insert Into A New Excel Sheet Data From A VB6 Form
Hi,
I am trying to put the data from a table into an Excel spreadsheet. People I work with said that they have done something like the following, but are not quite sure of the systex. THey said this should create the spreadsheet and insert the data. However, no matteres how I do this it comes back with either "incomplete query cluase" Or " Syntex error. I think I can do this with loops, but if I can get this statement to work it would be better.

Here is the code I have:

SQLStr = "SELECT * INTO '[Excel 8.0; Database = G:APPOMerlsS2.XLS].[Sheet1]' FROM tblFinalOut"
CN.Execute SQLStr

Any ideas would be greatly appreciated.
Thank You




Edited by - itmasterw on 2/18/2005 10:08:02 AM

Importing Excel Data Form One Sheet To Another One
hello friends!!! I hope someone can help me.... I have two worksheets in excel. In the first one I have all of my data. In the second one I want to create a report from the data of the first worksheet. How can I import that data to the second one, where I want to create my report?



Edited by - despianj on 3/5/2003 9:12:48 AM

Building A Word/Excel Like Data Sheet In A Visual Basic Form
I want to build a form in Visual Basic 6 which looks and acts like a Word table or an Excel data sheet, and enables the user to retrieve data from an Access mdb database, update it, insert new rows in the middle or the end of the sheet, delete rows etc.
What is the best way to do this ? Is there an existing control I can use or should I program everything myself ?
(I don’t want to use an actual Word document or Excel sheet inside my application with OLE, but to build a form which acts like it).

Importing Data From One Closed Excel Sheet Into Another Open Excel Sheet
Dear all,
   I am VBA newbie ... I need your help in importing the data froma closed excel document into another excel document.

Please help.
Cheers
Vivek

Transfering Data Form A Data Grid To Excel
Hi guys.

I have a program in VB6 which load data from an access table into a data grid, now I need to trasfer that data in the grid to an excel sheet. How can I do this?.

Thanks in advance

Grid Data Entry
I'm relatively new to VB6 and need some help. I'm creating an interface to another program which will receive several repeating parameters. I want to use a grid type control and let the user enter values into the cells. Everything I have found allows the program to insert data but won't allow me to make the cells editable. Any help would be appreciated

Data Entry Grid
Hi. I'm trying to find or make a control which is a grid for Data-Entry. I don't want to link it to a data source, but I do want to be able to, for example, validate the entries when the user moves from one column to the next (same row) I have looked at TrueDBGrid, but that will only validate when the row is complete (- as far as I can see, in application mode, do say if you know different...)

Any ideas? your help is muc appreciated.

Which Is The Best Grid For Data Entry In Vb 6.0?
Hi

I looking the best grid i can use for the data entry in master detail form. does ultra grid provide all the feature to make data etry easir for the users. does it large list of values and does it has key press search feauer?

Thanks
Ajay

Which Is The Best Grid For Data Entry In Vb 6.0?
Hi

Im looking the best grid i can use for the data entry in master detail form. does ultra grid provide all the feature to make data etry easir for the users?does it work perfectly with large list of values? and does it has key press search feauer?

Thanks
Ajay

Grid Data Entry By User
Does anyone know a simple way of entering data into the cells of a flexgrid as if it is a spreadsheet? Or failing that, does anyone know of a activex control that would do the job?

I'm having to position a textbox over the cells of a flexgrid to simulate a spreadsheet, its a pain in the ass.

It doesn't need to be database enabled or anything fancy like that, just as long as it can put data into a 2D array I'm happy, scrolling would be cool too.

Opening An Entry Form From A Grid
To edit a record from a grid object, I want to display an Entry Form Window from the grid object.

This works fine, but I would like to prevent a second Entry Form from being opened if the user double clicks on the grid again.

Ideally, I would like to bring the first window to the front, and leave its contents unchanged (or changed to the second grid row double clicked).

I can see that I could set up a variable as flag to show that a window is open, but is there a way to bring a window to the front.

Also, is there a better (built in) way to do this. I am using show.frmName to open the Entry From window in the first place

Many thanks for any help that can be given.

Peter Grant

Using Grid For Data Entry And Display Purposes
I am using a grid to display all product codes and amounts for a selected period. I am also using the grid to enter new products and amounts. Once the grid is populated I have a data class which contains all the codes and amounts that are displayed on the grid. Now when the save button is clicked I have to check if the product code is valid and if it already has an amount entered for it - update the value. Now a user can also simply change the value for a product code as well. So for every item in the grid I need to check the code and if the amount has to be updated. This seems very cumbersome, is there not something that I can do to my class or grid so that I immediately know which product codes must update.
Any helpful advice will be appreciated...


"The answer is out there, Neo, it’s looking for you. And it will find you, if you want it to."--Trinity to Neo

Concating Data Of More Than One Excel Sheet To One Sheet In The Same Work Book
Dear

I want to concate data of sheets in to another sheet in the same work book through VB.Please help me

Common Methods For Handling Data Entry /w Grid
We use the component one grid in our VB6 project. The grid is set up for data entry where you add a product id, we then fire off a transaction to our backend and it brings back description, price, etc..

We have quite a bit of logic in keeping track of all of the rows, using events to call a transaction to validate the data if changed, etc..

The amount of logic we have for this has caused quite a few headaches because of eratic behavior. We have users of the product that like to hit enter 10 times, or move around the grid, etc. while the transaction is firing off, or we are doing something in the background. This is a much greater problem when the user is over a slow connection.

We have implemented blockinput from the win32 api which stops all mouse/keyboard input. But this is a kluge to me.

What do other people do in this type of scenario. The only thing we've come up with is removing the data entry for the product from the grid. Instead add a few text boxes for product id, quantity, etc. and an add button. Then as the product entered, it would add it to the grid.

Thanks for the advice.

Mike

How To Show The Grid Of My Data Sheet In Macro?
Hello, Everyone: Good Morning!
After some copy and paste operations, my data has no any grid while other blank areas has. Would you somebody to let me know how I let the grid showing in my data sheet area using a small Macro program?Thanks.
Charlie

Data Grid Data Entry
I am currently creating "cash register" for my school project.
I never see find VB books that imply in using "data grid" as means of data entry. But when I went to a departemnt sote, I saw the cashier used datagrid (or maybe something that looks like it) as a way to enter the item code. Now, I started to get confused, since I couldnt find any resource to lead me in using DataGrid as a way to entry my data then stored into the database. thank you

Data Grid For Data Entry
Hello........
I'm useing Data Grid for data entring. I use coding insted of ADODA data
control. But I can't do any typing (editing) the cellpointer. pls
help me any one who familiya with dara grid

Thanks'
Suchira

Is't Possible To Put "Data" In Excel Sheet Or Value In DBGrid On Excel Sheet
I would like to Export Table .mdb connect with Data1 to an Excel Sheet. Is't possible with VB code?

Second option I have the same data in DBGrid is't possible to put Data in DBGrid on Excel Sheet.

Thanks
Redg

Data Entry Interface For Excel
I am a novice programmer trying to create a vb6 interface that will do the following:

Create an Excel Spreadsheet, format the spreadsheet, and name the spreadsheet based on user input.

The program will then be able to write and append data to the spreadsheet. The interface will be used to view the data by the user. It will also be where the user enters all data into the spread sheet. It must be written in vb6 not vba. These last two are mandatory as voice activation is going to be added later.

I realize that this is a lot of coding so i was wondering if there was a book or other documentation that someone might suggest that covers the syntax of referencing Excel from VB6. I have a book on vb6 from wrox, "Beginning VB6", but they don't cover any of this stuff.

Data Entry Form
Hello everyone,

I am new to this forum cause I want to get involved in learning more of VB6. I'm wondering if you guys can point out some links where I can go to get some codes on how to do this task I'm working on.

I want to use VB to create a data entry form then export the data to csv format. The form will require some dropdowns, checkboxes as well as input fields. No database connection is needed.

Hope I'm not asking to much.

Any help is greatly appreciated. Even if yu guys can provide me some books to read. Thats fine too.

Thank you.

TC

Data Entry Form
Hello there

I am very sorry to post this here. i could not get anyone
to respond on the ASP Side

How do you create a data entry form so the user will send FName, LName, phone, emAddress, and so on of a group of people.
i am using ASP to store info in Access database table. the objective is that i want to get list of names on the web
the number of people is not known since there are other info above this it is possible that i get names like 20, 40 or less at any time and when i press the sumit button i want all name to go together.

Thanks in advance

Data Entry Form
I need some help with a visual basic data entry form. The logic I am using is this. The user selects (using check boxes) a group of locations which need data updates. The program then performs a loop, traversing from one location to the next (the loop). As part of the loop, the program is supposed to load a data entry form where the user is to update the information, click a 'finished' button, and continue the loop. The problem is, the program doesn't wait for the 'data entry' portion. It simply goes through the entire loop so that the only item which can get edited in the 'data entry' form is the last item selected. How do I make the loop wait for the 'data entry' portion to be completed before moving to the next item in the loop?

Data Entry Form
I have a simple data entry form. I would for the user to be able to use the enter key to tab through the form. I am having trouble with a command button. I can use the enter key to get the focus of the cmd button, but when I hit the enter key again it skips a field(instead of going to fld 2 it goes to fld3) Need help!!

Data Entry Form
I posted this question earlier and realized I wasn't very clear so here is another go.
I am trying to do a simple invoice form with combo box to select a customer, another combox to select salesman, text boxes for invoice information, and a data grid to display and input invoice items.
Both combos are not bound and are filled with a list item class. the datagrid is bound to a invoice item dataset.

two problems I have is I would like the form to open with the next sequence number of the invoice table id # displayed, and without any data so the user can began a new invoice. the other problem is I would like the user to be able to navigate to previous records from this same form.
Any suggestions on wether I shoulc bind the controls to navigate and unbind to enter or just always bind, or never bind would be greatly appreciated.
tia

Data Entry Form
is it possible to filter only the numeric key
at the same time i want to trap the return key using the following statement :


Private Sub Text1_Keyup(Keycode As Integer, shift As Integer)
Dim lstitem As ListItem
If Keycode = vbKeyReturn Then SendKeys "{tab}"


end sub


thanks for any help.
usin

Data-entry Form
i know how to move down(to the next field) by pressing enter key using this code :

for example:-

Private Sub Text1_Keypress(KeyAscii As Integer)
If KeyAscii = 13 Then
KeyAscii = 0
SendKeys "{tab}"
End If


but can someone show me how to move the cursor to the previous field using the up-arrow key (in case of correction)

thank you in advance..

usin

Excel Form Password Entry
hey guys, my first time on the forum, thanks for the resource-
simple question -
can anyone tell me how to make forms work - i want a password hiding (****) thing, and as you cant do that with InputBoxes then i think forms are the only option.

i can make the form OK, but can anyone tell me how to verify?

i have a table with headings UserLevel - Password

any help would be ... helpful!
btw im using Excel XP version. thanks
dave

Please Help To Displaying DB Grid Or Flex Grid Entry On Textboxs!!
Could someone make a sample or code for displaying entry that I choose from DB Grid or Flex Grid
and I want to display it into textboxs.

Like example : I find some data in DB Grid or Flex Grid, I choose/click one of them and
                      the details displayed on the textboxt.

Please, help me!!
Many thank's.

Loading An Existing Excel To An Excel Sheet On A Form
How can I load Sheet1 of a current Excel program to a sheet object on my VB form? I don't want to load the entire app, just one sheet.

thanx.

Copy Excel Sheet To A Form's Excel Control
I have an Excel workbook. In this workbook I have a VBA form which contains an Excel Spreadsheet control. I want to copy a sheet from the actual workbook to the workbook of this control in my form. I've searched the forums and learned how to copy, but it doesn't seem to cooperate with the control. Any other methods? Thanks.

Data Entry Form Question
I'm very new using Visual Basic and have a question about what is probably a fundamental issue. I have an Access database which contains about 10 tables & ~40 fields per. I'm writing forms for users to edit/update data into that database. Using VB6, I have no problem getting data to appear in text boxes, etc. My problem is that I would like a data entry form which comes up with no data in the controls on the form. I would like to use a different form for data entry and data editing. I would think there is some way of designating a field to be empty at form start and bound to a field after a "add record" event. Please help.

Useful Code For A Data-entry Form...
Feel free to use and abuse...


VB Code:
Public Sub TurnEditting(frm As Form, booOn As Boolean, Optional HstrEnabled As Color = vbWhite, _    Optional HstrDisabled As Color = cLightGrey)'Goes through all of the controls on the form specified in the 1st parameter and'enables and disables them depending on the value of the 2nd parameter. It also'changes the colours of controls to indicate more whether the control is accessable'or not. For some controls it also depends on the value of their Tag property. i.e.''"FirstField" - If booOn was set to true, then before any other controls are changed,'               this control is enabled and then given the focus.'               NB: This is to ensure that the focus is not given to a disabled control.''"Locked": This control will never be enabled by this procedure, it will just be'          skipped instead.''A Long no. value For listbox controls: If you set the tag property to a long no'value then this long no will determine the background colour of the listbox, when'it is enabled.''Also searches the names of command buttons and enables/disables them depending...'i.e. if you set booOn to True, then it will enable all command buttons called "Save"'or "Cancel" etc, and disable all command buttons called "New" and "Amend" etc.''***PLAY AROUND WITH THE TAG AND CONTROL NAMES THAT IT SEARCHES FOR***''Note: You don't have to send one of the enumerated Color constants above, you can'also send hexidecimal values, or any of the standard vb colors i.e. vbBlack, the'enumerator is just there to make coding a little easier and saves you remembering'hexidecimal values for unique colors.''Note which control types it actually searches for, any others that are not on the list'aren't supported at the moment. Just add the code for them yourself!!!' On Error GoTo ErrorHandler     Dim ctl As Control        'Go through all of the controls on the form, find out the first edittable control    'and ensure that the focus is not given to a disabled control    For Each ctl In frm.Controls        If ctl.Tag = "FirstField" Then            If booOn Then                ctl.Enabled = True                ctl.SetFocus                frm.cmdNew.Visible = False            Else                frm.cmdNew.Visible = True                frm.cmdNew.SetFocus                ctl.Enabled = False            End If        End If    Next ctl        'Go through the rest of the controls on the form, disabling/enabling as neccesary    For Each ctl In frm.Controls        Select Case TypeName(ctl)            Case "TextBox", "ComboBox", "MaskEdBox", "DataCombo":                'no need to check if a locked control                If ctl.Tag <> "Locked" Then                    ctl.Enabled = booOn                    ctl.BackColor = IIf(booOn, HstrEnabled, HstrDisabled)                End If            Case "CheckBox":                'no need to check(tick) if a locked control                If ctl.Tag <> "Locked" Then                    ctl.Enabled = booOn                End If            Case "CommandButton":                If ctl.Tag = "SortButton" Then                    ctl.Enabled = Not booOn                Else                    Select Case ctl.Name                        Case "cmdNew", "cmdAmend", "cmdDelete", "cmdClose", "cmdSearch":                            ctl.Visible = Not booOn                        Case Else:                            ctl.Visible = booOn                    End Select                End If            Case "ListBox":                ctl.Enabled = Not booOn                ctl.BackColor = IIf(booOn, HstrDisabled, HstrEnabled)            Case "UpDown":                ctl.Enabled = booOn            Case "MSComm":                If ctl.PortOpen <> booOn Then ctl.PortOpen = booOn        End Select    Next ctl CleanUp:    Exit Sub    ErrorHandler:    MsgBox Err.Description, , Err.Number    Resume CleanUpEnd Sub

Bound Data Entry Form
I am wondering if there is a simple way to use a form as a dataentry as well as paging thru records.
I have tried to do this with a dataset and have not been successful.
Do you have to unbind to enter the data?

Access Data Entry Form
I have a database containing

tblLanguages:
languageID
languageName

tblInterpreters:
interpreterID,
interpreterName etc..

link table tblInterperterLanguages
interpreterID,
languageID


with the help of a form I want to populate a third table tblSessions
which contains the following fields:

sessionID,
languageID,
interpreterID

in the form I have a drop down select of languages which is pulled through tblLanguages via a query. next I have a drop down select list box of interperters which I want to populate when a language is selected, pulling all those interpreters who can speak that language. This may be a straight forward question to many but I am novice to MS Access and have no experience of using this package.
Thanks for help.
Regards.
PHP95SAJ

How To Automate Data Entry Though Isa Slot Puting It In Excel
hi,
i doing a project 4 my final semster, it's a datalogger. what i m facing difficulty is given below
1. i have call the data from the isa slot through c language that data is converted to text format and call in excel.
this can be done using import in the excel but what i want is that the dat should be call automatically in the excel from the text file and simulatneously dispaly the chart.
using import function we are manually adding data to the excel , i want it to be automatic data entery and simulatneously chart should be displayed.
could u please help me in solving my problem.
bye

Excel Validation: Only Allow Data Entry When Condition Is Satisfied
Folks,
I need to add validation to some cells in Excel (97) of the following kind:

-Allow data to be input in cell A1 only if cell A2 contains text.
(all happening on sheet 1 say).

Can anyone help me with this? Would really help me out.
Cheers,

Matt



Edited by - M_B on 5/28/2004 4:31:18 AM

Creating A HTML Data Entry Form?
Im new to VB but know the basic. What i want to do is create a form, where repetitive details can be entered into a form (like a database form) , and then this information is inserted into a HTML file with the specific formatting i want in the page.

Is this possible? How would I do this? - could Macromedia Dreamweaver be able to do this as well as VB?

Data Entry Form / Default Values
I've created a form in vb6to do some simple data entry for a sql server database.

I'm trying to make it work exactly as my old MSACCESS data entry form did.

My current issue is that when I add a new sale (Either by clicking the
->* or -> when at the last record) the default values don't appear. Neither does the new id (which is the identity with a seed of 1, or... autonumber field). How would I make these values show? I could set the textboxes manually to the default, but the autonumber I can't set manually, since it's not really a sequence of one (because other people might be adding sales too)

So ... any ideas?

Data From An Excel Sheet To Vb
Hi! I 've made an excel sheet where some functions are calculated and I 'd like to know if there is a way to connect this data to a vb6 program that I also made. This means taking the relults from the sheet and using them in vb6 in order to draw some lines.
If it's too general and need more info please ask!
I 'm really really desperate ...... and I 've ran out of time!!!!

thanx in advance!

Getting Data From An Excel Sheet
I haven't used VB 6 to open an excel sheet before. What I am looking for is some sample code that I can use to guide me through my code. I have already found some info for the Projects > References > Microsoft Excel 11.0 object library.

Here is what I am trying to do:

Open an excel spreadsheet (Vol1.xls)

Populate labels with cell data

Also, on a side note, should I populate an array with the cell data, or read the spreadsheet each time I need cell data?

Thanks for helping!

Data In To 2 Excel Sheet?
Hi all,

Im using an app someone send me on this forum.

Basically, it takes data from a table in access and moves it to a sheet in excel using VB.

I have two tables, I can take data from both tables: but how can you put them in two separate excel sheets?

Plz see attached tool

Thanks,

Danny











Added RESOLVED to thread title and green resolved checkmark - Hack

Last Row/col In Excel Sheet Containing Data
Hi

If anyone guide me to do the following, I will be obliged. I am using VB.NET.

How to find the last row or column number of excel sheet containing data using the VBA.

Dim Dim loXLAPP As Excel.Application
        Dim loXLSheet As Excel.Worksheet


        loXLAPP = New Excel.Application()

        If Dir(txtImpFileName.Text) <> "" Then
            loXLAPP.Workbooks.Open(txtImpFileName.Text)
        Else
            MsgBox("File '" & txtImpFileName.Text & " 'not found, QUITING ...", MsgBoxStyle.Information)
            Return
        End If

        loXLSheet = loXLAPP.Sheets(1)

            For i = 2 To 20 'loXLSheet.Rows.Count gives 65000 rows
                For Each j In lcCols 'loXLSheet.Rows.Count gives 256 columns
                    s = loXLSheet.Cells(i, j).Value
                    If Not s Is Nothing Then

                        ...........

                    End If
                Next
            Next

            loXLAPP.Workbooks.Close()
            loXLSheet = Nothing
            loXLAPP = Nothing

Muhammad Idrees
email me

Excel-sheet Into A VB-form ??
Today I transfer some figures from my VB-application to an excel-sheet,
and then a graph automaticly generated in excel. Is it possible to copy
this graph back into a form in VB, so the user don't need to go into excel and see the graph ??.

Excel Sheet On A Form
Hey i'm new to Excel and are creating a program to enter items onto a list. I would like to do it using an excel spreadsheet embedded on my form if i could. Is there any way of doing this. I have looked at macros and don.t think they are what i'm looking for. Is there an Excel Api in VB 6.0? Thanks.

Using A Excel Sheet In A Form
Hi.
I want to use an excel sheet in a form and read the edited values in the sheet.
First I inserted an "insertable object" Microsoft Excel Woksheet. However i can't access the values that the custumer puts in my sheet. I want to use something like:

Var1=Sheet.Cells(1,1)

It's that possible?
Anyone have any trick?

Thanks in advance!

VB Form To MS Excel Sheet
How do I take the data from the VB form (textbox) to the MSExcel Sheet TO THE REQUIRED CELL?
Will be helpful if you give the VB code for the same.
Do I have to install any new component for this?

Thanks,
Ram.
gsramkumar@lycos.com

Copyright © 2005-08 www.BigResource.com, All rights reserved