Exactly! I think you are absolutely right! I try to save, close, and then rename and transfer the file to a new folder. Thank You Very Much!
PS It really helped!
Search found 34 matches
- Tue Aug 03, 2021 3:32 pm
- Forum: Technical / Scripting
- Topic: Copy Range frome book 2 book Excel
- Replies: 11
- Views: 5422
- Tue Aug 03, 2021 1:51 pm
- Forum: Technical / Scripting
- Topic: Copy Range frome book 2 book Excel
- Replies: 11
- Views: 5422
Re: Copy Range frome book 2 book Excel
Checked the code line by line error appears when closing the second file. And it doesn't matter what method is used.
Application.Quit or ThisWorkbook.Close
Application.Quit or ThisWorkbook.Close
- Tue Aug 03, 2021 12:15 pm
- Forum: Technical / Scripting
- Topic: Copy Range frome book 2 book Excel
- Replies: 11
- Views: 5422
Re: Copy Range frome book 2 book Excel
The file is protected. Such an entry is not suitable because the password protects not opening, but editing! There are two kinds of password Password and WriteResPassword! I have already worked around the problem via VBA in another file, but the error appears. Everything works, but the error stops t...
- Tue Aug 03, 2021 3:49 am
- Forum: Technical / Scripting
- Topic: Copy Range frome book 2 book Excel
- Replies: 11
- Views: 5422
Re: Copy Range frome book 2 book Excel
As I said, the file contains a password for editing. XLO doesn't work i tried adding password to command record ! Therefore it is impossible. I cannot use commands without Handle Variable. Maybe Im stupid?
O! I think I can use XLC in the second file that I open with XLO. Let's try!
O! I think I can use XLC in the second file that I open with XLO. Let's try!
- Tue Aug 03, 2021 3:10 am
- Forum: Technical / Scripting
- Topic: Get filename in var without path and extension
- Replies: 7
- Views: 4395
Re: Get filename in var without path and extension
Great news! I'll try)
- Mon Aug 02, 2021 5:05 pm
- Forum: Technical / Scripting
- Topic: Copy Range frome book 2 book Excel
- Replies: 11
- Views: 5422
Re: Copy Range frome book 2 book Excel
I open the file this way, but for using XLRunCode I need a handle variable or am I wrong? VBSTART Dim xlApp Dim xlBook 'Opens the Excel file in Excel Sub OpenExcelFile(filename) Set xlApp = CreateObject("Excel.Application") xlApp.visible = true Set xlBook = xlApp.Workbooks.open(filename,,False,,,123...
- Mon Aug 02, 2021 5:00 pm
- Forum: Technical / Scripting
- Topic: Get filename in var without path and extension
- Replies: 7
- Views: 4395
Re: Get filename in var without path and extension
Thank you, I did so, the topic is closed.
- Mon Aug 02, 2021 3:53 pm
- Forum: Technical / Scripting
- Topic: Copy Range frome book 2 book Excel
- Replies: 11
- Views: 5422
Re: Copy Range frome book 2 book Excel
Thanks, but this is impossible, because the file where the lines need to be inserted has a password for editing. I cannot open it with Scheduler commands. I am using VBA to open it. I could simulate human actions using hotkeys, but I want optimized and fast code. I can write VBA code for Excel if yo...
- Mon Aug 02, 2021 1:08 pm
- Forum: Technical / Scripting
- Topic: Copy Range frome book 2 book Excel
- Replies: 11
- Views: 5422
Copy Range frome book 2 book Excel
I need to copy the specified range from one Excel book to the first empty table row of another book VBSTART Dim xlApp Dim xlBook 'Opens the Excel file in Excel Sub OpenExcelFile(filename) Set xlApp = CreateObject("Excel.Application") xlApp.visible = true Set xlBook = xlApp.Workbooks.open(filename,,F...
- Mon Aug 02, 2021 9:00 am
- Forum: Technical / Scripting
- Topic: Get filename in var without path and extension
- Replies: 7
- Views: 4395
Re: Get filename in var without path and extension
This will shorten the code thanks! May I ask offtopic? If I want to open an Excel file with a password, is it only through VBA? Are there any other options?
- Mon Aug 02, 2021 7:16 am
- Forum: Technical / Scripting
- Topic: Get filename in var without path and extension
- Replies: 7
- Views: 4395
Re: Get filename in var without path and extension
Code: Select all
ExtractFileName>file_names_%k%,oldfilename,0
StringReplace>oldfilename,.xlsb,,strNewString
WaitWindowOpen>%strNewString% - Excel
- Mon Aug 02, 2021 6:42 am
- Forum: Technical / Scripting
- Topic: Get filename in var without path and extension
- Replies: 7
- Views: 4395
Get filename in var without path and extension
Let>GFL_TYPE=0 Let>GFL_SORTTYPE=1 IfFileExists>Z:\Обмен\ЗАЯВКИ\ЗАЯВКИ в поставку\ОТЕЧ\2021\*.* GetFileList>Z:\Обмен\ЗАЯВКИ\ЗАЯВКИ в поставку\ОТЕЧ\2021\*.*,files,; Separate>files,;,file_names MessageModal>Num Files: %file_names_count% Let>k=0 Repeat>k Let>k=k+1 Executefile>file_names_%k% //Message>f...
- Thu Apr 15, 2021 8:33 am
- Forum: Beginners
- Topic: NewestFile only for visible?
- Replies: 4
- Views: 7316
Re: NewestFile only for visible?
I think you are absolutely right, but my inexperience prevents me from fully understanding the syntax of the language. Tell me how to write correctly? Function NewestFile(Folder) Set oFSO = CreateObject("Scripting.FileSystemObject") Set oFolder = oFSO.GetFolder(Folder) dPrevDate = "0" For Each oFile...
- Thu Apr 15, 2021 8:33 am
- Forum: Beginners
- Topic: NewestFile only for visible?
- Replies: 4
- Views: 7316
- Wed Apr 14, 2021 2:37 pm
- Forum: Beginners
- Topic: NewestFile only for visible?
- Replies: 4
- Views: 7316
NewestFile only for visible?
How can I change the function to only work for visible files? Function NewestFile(Folder) Set oFSO = CreateObject("Scripting.FileSystemObject") Set oFolder = oFSO.GetFolder(Folder) dPrevDate = "0" For each oFile In oFolder.Files If DateDiff("s", dPrevDate, oFile.DateLastModified) > 0 Then sNewestFil...