473,324 Members | 2,248 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,324 software developers and data experts.

Open Spreadsheet as modal Datasheet form in Excel, is it possible ?

215 128KB
Hi guy,
Datasheet form in Access is very good function, I can do the same thing in Excel by
Expand|Select|Wrap|Line Numbers
  1. Sheets(i).Usedrange.copy
  2. Set NewBook = Workbooks.Add(xlWBATWorksheet)
  3. With NewBook
  4.             .Sheets(1).Range("A1").PasteSpecial xlPasteValues, , True, False
  5.             .Sheets(1).Range("A1").PasteSpecial xlPasteFormats, , False, False
  6. End With
  7. 'some code to save data when close new workbooks
but how can I open this new workbook/worksheet or even open that sheets(i) as modal form like form in access ? is it possible to open an sheets(i) as modal form without create new temporate workbook (simulate Datasheet form)?
Jan 4 '16 #1
5 3576
jforbes
1,107 Expert 1GB
You could create the Excel document first,and then set it's read-only flag to true if you want to disallow changes to the document. Then open it Synchronously with
https://bytes.com/topic/access/insig...lwait-function
Jan 4 '16 #2
zmbd
5,501 Expert Mod 4TB
1) J's solution

2) This is clunky; however, doable:
In the VBA insert a form
Format the form as modal
Insert multicolumn listbox
If the range is static then the range.address is fairly easy for the rowsouce/controlsource.
You can then use the usual methods for determining entry and editing.
Handling events in the Excel-Forms is pretty much the same as for Access, just, imho, not as user/programmer friendly to get to.

3) Create a worksheet as desired, adding your command buttons etc...
In the deactivate event for the sheet, check for your required range entries and if not reactive the desired worksheet and select the desired range... I've done this a few times. Once or twice, I've had to disable the screen update to prevent flickering if there are long calculations or data pulls involved.
I'll also usually include code in the before_close event of the workbook to check for a flag/cell setting to force users to use the "close" button on the "Form"

++ Would you mind telling us why/what the goal of this is? There might be an easier method to accomplish the goal.
Jan 4 '16 #3
hvsummer
215 128KB
Thank everyone for the reply,
my goal is creating new tool that similar to power pivot,

I'll create new function base on SQL, with some new form to create query and bring all the SQL-database to excel

then everyone can use excel as a SQL-database without using access, the performance will surely increase as SQL work faster than Vlookup/index or any searching/match method of currently function.

ultimate, everyone can use friendly SQL in excel than learn to use access (every table will be just a range in excel)

so, first problem I'm solving atm is show up query result in a modal datasheet form (and let user save at specify range after close)

new workbook is good, but I want it to be more simple, just a datasheet form like access.
Jan 6 '16 #4
zmbd
5,501 Expert Mod 4TB
So, are you saying that you want to use Excel as the front-end to a database or are you trying to add database functionality to Excel:

> The former is quite common and there are tons/gobs of examples along with the inclusion of MS-Query (https://bytes.com/topic/excel/answer...e-excel-2010-a) - you'll be re-creating the wheel.

> The later, well, Excel is not a database, nor was it ever really intended to be a database. MS-Query is one method of bringing some type of database functionality to Excel; however, as you can see in the afore mentioned example, such things are klunky at best within a purely Excel framework. As you can see from just this one thread, simple implementation of the datasheet view, requires a great deal of work to achieve a less than satisfactory result.


ultimate, everyone can use friendly SQL in excel than learn to use access (every table will be just a range in excel)
Just to redirect you back to the link in the thread above: https://bytes.com/topic/excel/answer...e-excel-2010-a, this took a great deal of effort to accomplish - and is exactly what you will be up against within the confines of Excel.
Jan 6 '16 #5
hvsummer
215 128KB
So, are you saying that you want to use Excel as the front-end to a database or are you trying to add database functionality to Excel
that 2 reason are right, I want to add database function to excel which will or will not treat excel as database (excel can be front end if connect to hidden database or backend with table is a range)

the power pivot is not friendly, and multitable pivot is not the choice, pivot can't do as much as query, not flexible.

and I did post and SQL function to insight section of access, so that'll be simple enuf for you to understand what I trying to do.

the query maker interface of access is very friendly, I'm going to recreate it in excel with better support for standard User :D
I'm planing every detail of that right now, and I'll share/ask more question bout part I don't know :D
Jan 6 '16 #6

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

Similar topics

3
by: CLarkou | last post by:
Is there any way to get the record(s) the user has selected in a Datasheet form ?
2
by: Support4John | last post by:
a2k (9.0.6926) SP-3 Jet 4.0 SP-7 I have a button on a Single Form that when pressed displays all the underlying records in the table in a Datasheet Form. For example, Northwind, Customer...
2
by: Arnie | last post by:
I have searched this NG for datasheet column width posts and have read many of them. None of them seem to address what I would like to do. I'm beginning to think what I want can't be done. Here...
1
by: Thelma Lubkin | last post by:
I have a form that allows a user to choose a specific field value. The form calls a second, datasheet, form using a different field in the selected record as a filter . This second form has a...
0
by: Ben | last post by:
Please excuse if this ends up being a double post at some point. I tried posting using another website which crashed, so I am not sure if it will ever get posted. As such I decided to try again...
3
by: paulquinlan100 | last post by:
Hi Apologies for it is im sure a very basic question... Ive created a fairly standard datasheet form based on a query, however, whenever i open the form there doesnt seem to be a way of adding...
2
by: eko99312 | last post by:
Let's say I have this form called Attendance List. The list was in datasheet form. In the list there were names and date checklist. The question is, I want to edit one of the names by double clicking...
3
by: elmbrook | last post by:
I am unable to open a child form as a modal form. Here is my scenario I have a MainForm which is a toplevel form. Inside the MainForm I have a Toolbar Form which is a child. From the Toolbar...
2
by: Michael Burke | last post by:
Access 2007 Query - how to open forms in Datasheet View rather than Form View on a Switchboard. I need to change the code in the code element named "HandleButtenClick" Yet I cannot find this code...
4
by: Joe Y | last post by:
In a datasheet form I have the following Text Boxes. This datasheet form is embedded in a main form where the formula ID is linked. The datasheet form’s record source is bound to a Query named...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
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: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
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: 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
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.