Click here to Skip to main content
15,881,803 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: desktop/screen streaming to youtube/twitch by stream key or IP in visual basic.net Pin
Richard MacCutchan9-May-20 21:23
mveRichard MacCutchan9-May-20 21:23 
QuestionFill Data of Parents and multi levels of Child tables only Pin
EngrImad2-May-20 13:53
EngrImad2-May-20 13:53 
AnswerRe: Fill Data of Parents and multi levels of Child tables only Pin
Eddy Vluggen2-May-20 21:41
professionalEddy Vluggen2-May-20 21:41 
AnswerRe: Fill Data of Parents and multi levels of Child tables only Pin
evry1falls4-May-20 14:41
evry1falls4-May-20 14:41 
QuestionVB.NET Pin
Babayomi28-Apr-20 12:07
Babayomi28-Apr-20 12:07 
GeneralRe: VB.NET Pin
Ralf Meier28-Apr-20 20:01
mveRalf Meier28-Apr-20 20:01 
AnswerRe: VB.NET Pin
Richard MacCutchan28-Apr-20 21:44
mveRichard MacCutchan28-Apr-20 21:44 
QuestionCompare File Date Created Date Modified in VBA ( Allow Download time 20 mintes Buffer Time) Pin
Member 1478441625-Apr-20 3:27
Member 1478441625-Apr-20 3:27 
I am writing a code in VBA that opens up all files in a document and copies and pastes the information from each document. User save to raw date report in path without open it, ( No one edit or modifiy Financial Number in Raw Date Download file) So I want to check each Workbook Date Created Time vs Date Modified Time both should match, then allow Copy and paste else show the Message box to user, File has been Modified, kindly revisit and download raw date" Here we can allow 20 minutes buffer time for downloading Report ie 24-Apr-2020 2.30 P.M vs 24-Apr-2020 2.50 P.M time will allow.
My code is below and any help or suggestion would be much appreciated. Thanks

Dim Ref As Object, CheckRefEnabled%
    CheckRefEnabled = 0
    With ThisWorkbook
        For Each Ref In .VBProject.References
            If Ref.Name = "Scripting" Then
                CheckRefEnabled = 1
                Exit For
            End If
        Next Ref
        If CheckRefEnabled = 0 Then
            .VBProject.References.AddFromGUID "{420B2830-E718-11CF-893D-00A0C9054228}", 1, 0
        End If
    End With

Dim objFSO As Scripting.FileSystemObject
Dim myFolder As Scripting.Folder
Dim myFile As Scripting.File

Set objFSO = CreateObject("Scripting.FileSystemObject")

Set myFolder = objFSO.GetFolder("C:\ME Financial Report\")

For Each myFile In myFolder.Files

       DCreated = myFile.DateCreated
       DCreated = Strings.Format(myFile.DateCreated, "DD-MM-YY,HH:MM")
       DModified = myFile.DateLastModified
       DModified = Strings.Format(myFile.DateLastModified, "DD-MM-YY, HH:MM")
       DModifiedAdd = DateAdd("n", 20, DModified)
       DModifiedAdd = Strings.Format(DModifiedAdd, "DD-MM-YY, HH:MM")
       Debug.Print DCreated, DModified, DModifiedAdd
       
       If DCreated >= DModifiedAdd Then
       MsgBox "File has been Modified, kindly revisit and download raw data -  " & myFile, vbCritical
       Exit Sub
       Else
    End If
Next myFile

AnswerRe: Compare File Date Created Date Modified in VBA ( Allow Download time 20 mintes Buffer Time) Pin
Richard MacCutchan25-Apr-20 4:14
mveRichard MacCutchan25-Apr-20 4:14 
QuestionBinding Navigator Movement Event Error Pin
Member 1480975421-Apr-20 23:23
Member 1480975421-Apr-20 23:23 
AnswerRe: Binding Navigator Movement Event Error Pin
Gerry Schmitz22-Apr-20 9:14
mveGerry Schmitz22-Apr-20 9:14 
GeneralRe: Binding Navigator Movement Event Error Pin
Member 1480975422-Apr-20 23:16
Member 1480975422-Apr-20 23:16 
GeneralRe: Binding Navigator Movement Event Error Pin
Mycroft Holmes23-Apr-20 11:16
professionalMycroft Holmes23-Apr-20 11:16 
QuestionLogoff or disconnect system account session at Ctrl + Alt + Delete screen Pin
Member 146239898-Apr-20 17:20
Member 146239898-Apr-20 17:20 
AnswerRe: Logoff or disconnect system account session at Ctrl + Alt + Delete screen Pin
Member 1462398914-Apr-20 9:23
Member 1462398914-Apr-20 9:23 
QuestionVisual Basic "originated from an internet" EXCEL Pin
raeyoung7-Apr-20 4:18
raeyoung7-Apr-20 4:18 
QuestionRe: Visual Basic "originated from an internet" EXCEL Pin
Richard MacCutchan7-Apr-20 4:50
mveRichard MacCutchan7-Apr-20 4:50 
AnswerRe: Visual Basic "originated from an internet" EXCEL Pin
raeyoung7-Apr-20 7:22
raeyoung7-Apr-20 7:22 
GeneralRe: Visual Basic "originated from an internet" EXCEL Pin
Richard MacCutchan7-Apr-20 7:59
mveRichard MacCutchan7-Apr-20 7:59 
GeneralRe: Visual Basic "originated from an internet" EXCEL Pin
raeyoung7-Apr-20 8:07
raeyoung7-Apr-20 8:07 
GeneralRe: Visual Basic "originated from an internet" EXCEL Pin
Richard MacCutchan7-Apr-20 9:12
mveRichard MacCutchan7-Apr-20 9:12 
AnswerRe: Visual Basic "originated from an internet" EXCEL Pin
Mycroft Holmes7-Apr-20 11:15
professionalMycroft Holmes7-Apr-20 11:15 
QuestionInstall a VB Net application to install a sql database on other computers Pin
Member 147798703-Apr-20 12:41
Member 147798703-Apr-20 12:41 
AnswerRe: Install a VB Net application to install a sql database on other computers Pin
Dave Kreskowiak3-Apr-20 14:12
mveDave Kreskowiak3-Apr-20 14:12 
AnswerRe: Install a VB Net application to install a sql database on other computers Pin
evry1falls6-May-20 9:22
evry1falls6-May-20 9:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.