• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Needs VBA to Pull Data from Queries to Forms

nkms143

Member
Hi to all,

I have a Client Data base which has been saved in Excel Sheet. Each Client has it own Excel File. Now, What i Want is to Pull Data from Each Client in a Prefixed Form Format. Now i'm in Doubt that Formulas will work. Hence, I Need VBA Code to pull Data from Client Database. I have added 2 Sheets namely 'Working sheet' and 'Queries' in the Sample Workbook. What i want is A VBA Code Which will pull Data from Queries Sheet to Working sheet which contains a form which is a fixed pattern. Few Cells Highlighted with blue colors Contains Formulas hence it should be left untouched. Some of the Fields in Queries sheet have multiple Rows which also needs to pe pulled in Working Sheet. Any Help is Greatly Appreciated. Thanks in Advance
 

Attachments

  • C_Sheet (2).xls
    75 KB · Views: 8
Where do You need VBA Code?
Why You cannot write to 'Working Sheet' Cell A5 =Queries!B4 and so on?Screen Shot 2016-10-23 at 22.28.19.png
 
I have to do this for each and every Query Sheet in Different File. So Forumla Won't Work. A VBA Will Work For me. A Macro Module Will Work For me.
 
So, You can do that Yourself!
Make own Macro like ...
Code:
Sub Do_nkms143()
    Sheets("Working Sheet").Range("A5") = Sheets("Queries").Range("B4")
'    and so on...
end sub
... and if You can use some loop then less code
> Ideas? ... Answers? ... Questions?
 
I have already tried the Code. However the length of the Code is too big. Is there any another alternate code which involves lesser code!!!!!!
 
What is too big?
Maybe 64k of code is too big?
Code:
Sub Do_nkms143()
    Q = "Queries"
    with sheets("Working Sheet")
        .range("A5") = sheets(Q).range("B4")
'        and so on
    end with
end sub
 
Back
Top