#16
|
|||
|
|||
I am just tried in the word before but i had the error report and highlighted third line.
So that i am using this macro in to the excel. Anyway i have attached the error. Please advise. |
#17
|
||||
|
||||
And did you added the required Excel reference - as set out in the Note above?
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#18
|
|||
|
|||
I am not able to find such as "Excel object Model" via tools|references|available references.
Can you please tell me the exact reference name? |
#19
|
||||
|
||||
Except for the active ones, the references are sorted alphabetically. The one you're looking for is the Microsoft Excel 16.0 Object Library, as per post 10.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#20
|
|||
|
|||
Yes!! I got it
But the excel path is default per code (C:/) or we can able to modify as in the same folder? Currently i have the error message as per code. |
#21
|
||||
|
||||
The macro already looks in the same folder - for your 'Data to fill.xlsx' workbook.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#22
|
|||
|
|||
Error attached...
Please check |
#23
|
|||
|
|||
Hi Paul!!
Now i can able to run the macro after remove the content "ThisDocument" I will let you know if anything further!!! Fantastic work!!! |
#24
|
||||
|
||||
Evidently, either:
• the document you've added the macro to has never been saved; or • you've added the macro to a document template and you're trying to run it from that instead of from a document created from the template. If running the code from a document attached to a template, change 'ThisDocument' to 'ActiveDocument'.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#25
|
|||
|
|||
Yes got it!!
Is there any other way to select from drop-down control values based on the workbook? For ex: IF WB=Esy, then Word=1-Easy Because they given the data in excel sheet like that... |
#26
|
||||
|
||||
I already addressed that in post 8: https://www.msofficeforums.com/word-...tml#post132074
Why don't you correct the workbook, via Find/Replace? Coding around this seems to be a lot of unnecessary work.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#27
|
|||
|
|||
Yes Paul
I read that, but i just wanted to know that the reason of curiosity!!! Also the workbook they provided has been may protected. |
#28
|
|||
|
|||
If in word document sometimes have tables row rage may vary.
What we do in this case? for ex: some of the tables have the PV in row 10 etc. |
#29
|
||||
|
||||
So what else haven't you told me about the table structures? The only examples you gave all had the PV is the same row & column. It seems I wasted my time coding for something that isn't representative of what you actually have.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#30
|
|||
|
|||
Hi Paul
Really Sorry for that... I just realized that the row is dynamic positions. And i am not sure you will be created the macro based on the cell ranges. All the values of cell rage pulled from the excel is dynamic.. Sorry once again!! |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Need macro to fill data from different sheets based on selected item from drop down | skorasika | Excel Programming | 1 | 03-13-2015 11:25 AM |
Newbie to excel for starters, needing to transfer info from sheet2 to universe sheet. | rogcar75 | Excel | 0 | 08-12-2014 07:21 AM |
Color-fill a range of cells, based on text in a different sheet. Possible? | unittwentyfive | Excel | 2 | 06-01-2014 06:48 AM |
link conditional info in word based on excel list | stijnvanhoof | Mail Merge | 1 | 11-13-2012 01:55 PM |
Open Word w Excel & fill Word textboxes w info from Excel fields runtime error 4248 | Joe Patrick | Word VBA | 2 | 01-30-2012 07:23 AM |