Bekijk de onderstaande video om te zien hoe je onze site als een web app op je startscherm installeert.
Opmerking: Deze functie is mogelijk niet beschikbaar in sommige browsers.
Privacywetgeving
Het is bij Helpmij.nl niet toegestaan om persoonsgegevens in een voorbeeld te plaatsen. Alle voorbeelden die persoonsgegevens bevatten zullen zonder opgaaf van reden verwijderd worden. In de vraag zal specifiek vermeld moeten worden dat het om fictieve namen gaat.
Sub Move_Rename_Folder()
'This example move the folder from FromPath to ToPath.
Dim FSO As Object
Dim FromPath As String
Dim ToPath As String
Dim DefaultFolder As String
DefaultFolder = "C:\Dropbox\documenten\"
FromPath = DefaultFolder & Year(Now()) & "\offertes\" & Sheets("Blad1").Range("A1") 'Cell is Foldernaam
ToPath = DefaultFolder & Year(Now()) & "\Afgehandeld\" '<< Change
'Note: It is not possible to use a folder that exist in ToPath
FromPath.Close 'als deze folder nog open staat dan eerst sluiten. ( dit werkt niet)
If Right(FromPath, 1) = "" Then
FromPath = Left(FromPath, Len(FromPath) - 1)
End If
ToPath = ToPath & "" & Sheets("Blad1").Range("A1")
Set FSO = CreateObject("scripting.filesystemobject")
FSO.MoveFolder Source:=FromPath, Destination:=ToPath
MsgBox "De map is verplaatst van " & FromPath & " to " & ToPath
End Sub
Sub FolderSluiten()
CloseWindow ("Downloads") [COLOR="#008000"]'Window Caption, Case sensitive[/COLOR]
End Sub
Private Declare PtrSafe Function PostMessage Lib "user32" Alias "PostMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Private Declare PtrSafe Function GetWindow Lib "user32" (ByVal hwnd As Long, ByVal wCmd As Long) As Long
Private Declare PtrSafe Function GetWindowText Lib "user32" Alias "GetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String, ByVal cch As Long) As Long
Private Declare PtrSafe Function GetClassName Lib "user32" Alias "GetClassNameA" (ByVal hwnd As Long, ByVal lpClassName As String, ByVal nMaxCount As Long) As Long
Const WM_CLOSE = &H10
Const GW_HWNDFIRST = 0
Const GW_HWNDLAST = 1
Const GW_HWNDNEXT = 2
Private Sub CloseWindow(WindowCaption As String)
Dim lngWindow As Long, lngWindowLast As Long
Dim strClassSought As String: strClassSought = "CabinetWClass" [COLOR="#008000"]'type of window to close[/COLOR]
Dim strTitleToClose As String: strTitleToClose = WindowCaption [COLOR="#008000"]'windows to include[/COLOR]
Dim strClass As String, strTitle As String
Dim i As Integer
lngWindow = GetWindow(Application.hwnd, GW_HWNDFIRST)
lngWindowLast = GetWindow(Application.hwnd, GW_HWNDLAST)
[COLOR="#008000"]'now loop through all windows[/COLOR]
Do While lngWindow <> lngWindowLast
[COLOR="#008000"]'create a buffer for the class name and the window title[/COLOR]
strClass = Space(100)
strTitle = Space(100)
'get the class name and the window title
GetWindowText lngWindow, strTitle, 100
GetClassName lngWindow, strClass, 100
[COLOR="#008000"]'check whether this window matches the criteria[/COLOR]
If InStr(strClass, strClassSought) <> 0 And InStr(strTitle, strTitleToClose) <> 0 Then
[COLOR="#008000"]'post a message to the window to close itself[/COLOR]
PostMessage lngWindow, WM_CLOSE, 0&, 0&
[COLOR="#008000"]'start all over[/COLOR]
lngWindow = GetWindow(Application.hwnd, GW_HWNDFIRST)
Else
[COLOR="#008000"]'get the next window[/COLOR]
lngWindow = GetWindow(lngWindow, GW_HWNDNEXT)
End If
C1 = C1 + 1: Application.StatusBar = C1: DoEvents
Loop
End Sub
ik neem aan dat u dit niet zo even uit uw mouw schud?
Ik heb geen idee wat je daarmee bedoelt en die code sloopt helemaal niets.nu ik hem een tijd hebt gebruikt bemerk ik dat deze in Windows de OLE sloopt.
Sub M_snb()
With CreateObject("scripting.filesystemobject")
.movefolder "G:\downloads\FINVIZ.com - Stock Screener_bestanden\container_data", "G:\verbazing_001"
End With
End Sub
We gebruiken essentiële cookies om deze site te laten werken, en optionele cookies om de ervaring te verbeteren.