By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,490 Members | 3,266 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,490 IT Pros & Developers. It's quick & easy.

How to create controls in an excel worksheet which has been opened from access module

P: 26
I have created the excel worksheet from MS Access using the following code:
Dim xlApp As Excel.Application
Dim xlWB As Excel.Workbook
Set xlApp = New Excel.Application
With xlApp
.Visible = True
Set xlWB = .Workbooks.Open("QuestionPaper.xlsx", , False)
Dim ws As Worksheet
Set ws = Worksheets("Sheet1")
End With

Now I have access table which has the values of questions , numbe rof answers and the question value and answer value.

Based on number of answer and the answertype(radiobutton, textbox, checkbox) the controls have to be created.

I know the number of answer values , which i am using to run a loop (I know the question value which I am entering in the excel sheet in this way ws.Cells(rowval, colval) = Questn)

Inside the loop I have cases "Radio" "check" etc etc
For each case , and based on loopcounter value controls have to be created.

How do I activate the excel sheet FROM aCCESS and create the controls ?---MY QUESTION *************************(Any userform need to be created in excel ?then userform has to be created once and according to loop counter teh controls have to created.Or directly in the sheet cant I put controls?)

Later also on clicking of Submit button in the end the values of each questions answer should be inserted in a answer table.

Using Office 2007.

[[[[Also if there is no way of creating control in excel sheet from access module, how do i change control from access to excel and then in excel create module and insert code for adding userform and adding readios, checkboxes to it and then again come back to access code.]]]

Thanks in advance.Please help me.I need to finish this ASAP.
Titli
Mar 31 '11 #1
Share this question for a faster answer!
Share on Google+

Post your reply

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