Hey, need help on some basic stuff related to macro

suryu

Member
Local time
Today, 23:56
Joined
Apr 3, 2020
Messages
86
I have opened workbook using macros in access and want to do below steps
1) I have workbook open with some specific columns, i need validation on first column and it should take data from another sheet(distinct value)
2)how to take data in another sheet from query
 
Last edited:
Hi. This sounds like an Excel problem. If so, I'll ask the mods to move it out of the Access Forum.
 
Hey no, using macros i need to do, check once again my post
 
i am working on access, and open workbook using below query

set oXL= Createobject("excel.application")
oXL.visible = tRue
set wkbk=oXl.Workbooks.add
set sht = wkbk.sheets(1)

after that i set field value and now i want to take data from query to another sheet

could you tell me how to take data from query to another sheet?
 
i am working on access, and open workbook using below query

set oXL= Createobject("excel.application")
oXL.visible = tRue
set wkbk=oXl.Workbooks.add
set sht = wkbk.sheets(1)

after that i set field value and now i want to take data from query to another sheet

could you tell me how to take data from query to another sheet?
Hi. Have you tried something like?

Set sht2 = wkbk.sheets(2)
 
yes, i have created another sheet too.

let me brief u again

i have query where one columns data is there.

I want to take distinct data from query 1 to sheet2.

something i am doing code like set qd= currentDb.queryDefs("query1")

after that how to do ?
 
yes, i have created another sheet too.

let me brief u again

i have query where one columns data is there.

I want to take distinct data from query 1 to sheet2.

something i am doing code like set qd= currentDb.queryDefs("query1")

after that how to do ?
Hi. Have you tried the CopyFromRecordset method?

 
no, i have not tried

how to copy from query to directly paste to active sheet
 
Thanks , i was doing from other logic but now its done :)
 
Hi,

I am facing issues with data validation property.
I have one column data in second sheet and want to take those data from second sheet to first sheet in drop down list using vba code in access.

Could you please help me with that.

thank u in advance
 
Hi,

I am facing issues with data validation property.
I have one column data in second sheet and want to take those data from second sheet to first sheet in drop down list using vba code in access.

Could you please help me with that.

thank u in advance
Hi. I really don't do much Excel, but take a look at the VBA example at the end of this article. Hope it helps...

 
Hi. I really don't do much Excel, but take a look at the VBA example at the end of this article. Hope it helps...

thanks :)
 

Users who are viewing this thread

Back
Top Bottom