Hi Dave,
Thanks you very much, the code is work that i want.
Thanks,
Andy:wink1:
Hi Dave,
Thanks you very much, the code is work that i want.
Thanks,
Andy:wink1:
Hi expert,
Need help from you all. My problem is I need to open the workbook that will change the name every week from a server. Example like [2004_ABC2.5.xls]. Every week, the file name will change, maybe is [2004_ABC2.4.xls], [2004_ABC2.6.xls], [2004_ABC2.3.xls]. It only changes after [.], the [2004_ABC2] will not be change.
Before that, I use the code like this
Dim strOrgFilePath, strOrgFolderPath, filename As String
Dim wb1 As Workbook
strOrgFolderPath = "e:\testing\"
strOrgFilePath = Dir(strOrgFolderPath, vbNormal)
strOrgFilePath = strOrgFolderPath & strOrgFilePath
Set wb1 = Workbooks.Open(strOrgFilePath)
filename = Trim(Left(strOrgFilePath, InStr(1, strOrgFilePath, ".xls") - 1))
Display More
At the folder [testing], it have many other excel file, but just have 1 file only that start from [2004_ABC2]. So, have any solution to open this workbook? Thanks for any help.
Regards,
Andy
Hi Dave,
Thanks a lots for your help. It's works.
Regards,
Andy:biggrin:
Hi all,
Have little problem need help from you all. The problem is everytime i execute the macro coding of copying data from another workbook. It will display a message box. The message box is
There is a large amount of information on the Clipboard. Do you want to be able to paste this information into another program later?
*To save it on the Clipboard so that you can paste it later, click Yes.
*To delete it from the Clipboard and free memory, click No.
Yes No Cancel
So, have any code to close this message box because i don't want it display when everytime excute the macro code.
Thanks & Regards,
Andy
Hi all,
Need help from you all.
i had 2 workbook, name is book1.xls, book2.xls. Each workbooks have same worksheet, and i had to compare the 3 column (A, B,C) data each worksheet for this 2 workbook. If the data is not same, it need to copy out the entire row and paste into new workbook. So, have any solution for this for compare the 3 column, and copy out?
Thanks a lots for any help and Merry Christmas
Andy
Hi all,
i have some problem need help.
i have one excel file that put at share drive (Server), example the path like c:\excel\coding\abc.xls
at the folder coding is only have 1 file, that is abc.xls, but the filename maybe will change next week. Also can say next week i put other filename[abc22.xls] at folder coding but important is the folder coding will only contain 1 file only.
Can the VBA coding catch the file at the folder although filename is change weekly and copy the worksheet data ? The path is fix, just filename change.
Have this VBA function?
thanks,
Andy
Thanks for you all help, especially Colo.
Thanks & Regards,
Andy
Hi Colo,
i still facing some problem, still can solve yet.
When i run it, there have a error. The error is
Run-time error '9':
Subscript out of range.
The error line is
b(0) = Left(a(2), 1) & "-" & Mid(a(2), 2)
i also got some question asking you,
Q1 : For the field "Type", if is not only contain API, is will contain empty or other data. It like that
PPC
P1
P2
API
A1
A2
PPC
P1
P2
API
A1
A2
So, eveytime i need to search the field "Type" contain name 'API', and go to field "Component, Seg" change the format. How to do it?
Q2: When i push a button, how do i auto replace all the original naming to the format i want at the same worksheets?
Lastly, i want thanks a lots that the effort for helping me, thanks.
Thanks & Best Regards,
Andy
Hi Colo,
Actually is like that, P1, Seg, Componet, Type is a field. There have thousand of data like that, but the field for (P1, Seg, Component) will change only, and Type will not change.
Seg...........Component..........................Type
--------------------------------------------------
MB..........700cm 600CP D1 DLC............API
MB...........500cm 300CP K2 DDPA.........API
And i will need to search by the column field "Type", if have API name, i will need to change the naming of field (Seg and Component) to the format below.
Seg.........................Component............Type
------------------------------------------------------
Monitor 600CP......D-1 700cm DLC.......API
Monitor 300CP......K-2 500cm DDPA.....API
The "." is nothing, mean space only at here.
And for you question :
Q1 : D1 is located at same place, that is the 13th -14th character in the cell.
Q2 : The size of the data is fix, maybe is 200cm , 500cm, 700cm only. It is from the 1st to 5th character in the cell.
I just starting learn using VBA to do my project. Many function is didn't no very kknow how to sure yet. So, are you know how to auto change the sequence format like above for the all worksheet data when i enter a button.
Thanks & Best Regards,
Andy
Hi, everyone. I need for help.
i now is facing some problem of my project.
This is the one of the data at the cells (column)
700cm 600CP D1 DLC
And i want change it to this format
D-1 700cm DLC 600CP
So, how can i pick or search the location of D1 and put it in the front of the cells. And also change the data to the sequence that i want .
thanks & Best Regards,
Andy