Naresh Patel
asked on
TT Master Button
I had this question after viewing TT Reverse Entry.
Hi experts,
Need a help with code which execute module macro one by one.
i had created
and need to add one more task in posted macro - after last module end ...needs to clear all data from sheet Import and print Done in Cell A1.
need to assign this macro to button existed in sheet Import
See Attached
Thanks
-TT-WIP-D.xlsm
Hi experts,
Need a help with code which execute module macro one by one.
i had created
Sub MasterImportUpdating()
Call SplitImportData
Call AddColumn
Call CopyFormulas
Call SortColumn
Call UpdatingMaster
Call ReversError
End Sub
it leads to error and need to add one more task in posted macro - after last module end ...needs to clear all data from sheet Import and print Done in Cell A1.
need to assign this macro to button existed in sheet Import
See Attached
Thanks
-TT-WIP-D.xlsm
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
When I'm testing your file I keep getting an overflow error on this line in the sub UpdatingMaster
Is that the same error that you get?
wsMaster.Range("AC" & rngFound.Row).Resize(1, 7).Value = c.Offset(, 29).Resize(1, 7).Value
Is that the same error that you get?
ASKER
Yes Same error
Try changing that line to this:
wsMaster.Range("AC" & rngfound.Row, "AC" & rngfound.Row + 7) = Range("A" & c.Row & ":G" & c.Row).Offset(, 29).Value
wsMaster.Range("AC" & rngFound.Row).Resize(1, 7).Value = c.Offset(, 29).Resize(1, 7).Value
Not sure that is correct, because specification for TT Add/ Update says columns AD to AJ, and above use AC to AI
I don't see any reason why it does not work, and the file I send run without errors.
Rgonzo1971 made the code, perhaps he can find the reason.
I would suggest to insert the values one by one, by replacing the line with this, then it runs.
For i = 1 To 7
wsMaster.Cells(rngfound.Ro w, 29 + i).Value = c.Offset(, 29 + 1).Value
Next i
AC is column number 29, so the values replaced are for columns AD to AJ.
Not sure that is correct, because specification for TT Add/ Update says columns AD to AJ, and above use AC to AI
I don't see any reason why it does not work, and the file I send run without errors.
Rgonzo1971 made the code, perhaps he can find the reason.
I would suggest to insert the values one by one, by replacing the line with this, then it runs.
For i = 1 To 7
wsMaster.Cells(rngfound.Ro
Next i
AC is column number 29, so the values replaced are for columns AD to AJ.
ASKER
it is my start up in VBA ...i cant understand core VBA coding ...please suggest what i do?
Thanks
Thanks
ASKER
if i run Sub MasterImportUpdating() on old data it is working fine (which is being in sheet sample data in my original post ) but when i run on new data that error pop up....see my 2nd attached file.
Thanks
Thanks
I used your second file when updating that line. It works fine for me. Are you still getting an error with the update that I suggested?
ASKER
just out of context ...seen this in EE Lucky draw....seems i am in the race :) :) ;)
Are you still getting the overflow error?
ASKER
yes
The problem is the data in column AG. you have it formatted as "Custom => d-mmm-yy" Whatever is in that column is what is causing the overflow. Those are not dates. when nI change that column to plain text it works fine.
ASKER
if that is the case then cant we add one more sub which select all column and format as general....before executing Module M6_UpdatingMaster - Sub UpdatingMaster().
Thanks
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Perfect and i am in dilemma ...please understand
No worries, glad to help.
ASKER
See attached new sample data added in sheet sample data
---TT-WIP-D-1.xlsm