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

To populate Excel sheet

Roy
Thanks for taking time to answer.I have a A2K application from which I
run series of Events by clicking few command buttons.This generates
queries,the result of which I copy and paste to worksheets in
Excel.There are 14-15 sheets which I populate manually.This I repeat
for 10-15 users.I use a Excel template which I copy and name it
according to the users and then populate.Is there a way to automate
this?I need to export these queries which are driven by the buttons
,open up the template and the corresponding worksheet.Is there a way to
insert rows based on the number of records in a query and then populate
,so that my formulas in the template are intact?Is this possible or too
tall a task?
Regards,

Roy

Nov 28 '05 #1
3 6971
did you look at the code here?
http://www.mvps.org/access/modules/mdl0035.htm

Nov 28 '05 #2
Roy
Thanks for the reply.What I am looking is to have a table containing
the names of the function procedures and in a click event of a button
read all these as a recordset and start exporting one by one.Someone
had posted similar approach to this problem here ,but i am unable to
locate the same. I already know how to transfer this using VBA but it
is not a elegant way.Also is there a way to fcalculate the number of
rows to be inserted based on the number of records?

Thanks

Roy

Nov 29 '05 #3
Roy:

This may be way off base, but perhaps it would be better to have your
Excel templates grab external data from your Access app rather than
pushing data from your app to Excel? If your queries are always stored
under the same names, use MS Query to grab the query in your Access app
as your external data source, and only use your code to update the
queries. In Excel, the External Data Range Properties allow you to
designate that formulas automatically fill down in columns adjacent to
data as well as give you several other fine-tuning options.

On another note, you say that you "run series of Events by clicking few
command buttons". You should be able to program everything into one
button if there is logic behind the sequence that you execute them.
You can reference other subs within the same module by simply calling
them. For instance, if you have
Private Sub MyFirstButton_Click()
[Code for the first button]
End Sub

Private Sub MyNextButton_Click()
[Code for the second button]
End Sub
in the same module, you can trigger the code for the next button in the
first button's code by calling it like this:
Private Sub MyFirstButton_Click()
[All the original code for the first button]
MyNextButton_Click
End Sub

Hope this helps,
Jana

Nov 29 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: Allison Bailey | last post by:
Hi Folks, I'm a brand new Python programmer, so please point me in the right direction if this is not the best forum for this question.... I would like to open an existing MS Excel spreadsheet...
0
by: dgoel | last post by:
Hi, I Have a text file & I want to open it in excel sheet ( withou importing). I have written code for it, but it is not opening exce sheet. It opens the text file, but does not create a excel...
12
by: elziko | last post by:
I'm using late binding (I must) to automate Excel. My code opens Excel after createing and poulating some sheets. My problem is that when the user finally decides to close Excel its process is...
3
by: | last post by:
I wrote a class in VB.NET to export the contents of a datagrid to Excel. It works perfectly on my machine, but it fails on my customers' PCs that have identical versions of Win XP (SP1) and Excel...
3
by: implicate_order | last post by:
Greetings, I'm new to python and am in the process of writing a script to parse some CSV data, spread it across multiple Excel worksheets and then generate charts. I searched the internet to...
3
by: pleaseexplaintome_2 | last post by:
using the code below (some parts not included), I create a new excel workbook with spreadheets. I then want to delete a spreadsheet, but a reference remains open and excel stays in task manager...
13
by: chuckie_9497 | last post by:
hello all you gurus. I am struggling with releasing com objects. I have isolated the problem to the code below. Objects are released and the process ends until I use "int k = sheet.Count;" Then...
0
by: Padma Athimoolam | last post by:
Hi, I am new to VB and XML.I want to populate XML Values in Excel Sheet.My Sample XML is <?xml version="1.0" encoding="UTF-8" ?> - <workbook> - <worksheet name="Scorecard_KTC_MW"> <cell...
2
hemantbasva
by: hemantbasva | last post by:
Note We need to have a template on server for generating report in multiple sheet as we do not had msoffice on server moreover this require a batch job to delete excel file created by the...
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
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...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.