I have another quest regarding this....i was trying to do the same thing to another file but the .DateLastModified must equal today's date... i tried multiple ways and nothing works...its looks like its not recognizing the date and if i put...... .DateLastModified >= date <--- this...
I'm trying to write a script to check a files date and time so i know its ready to upload. I'm not sure what im doing wrong but i need to check if the file is greater than 10:00AM and also greater than yest date.
Dim objFS, strFile
Set objFS = CreateObject("Scripting.FileSystemObject")...
Hi,
Was wondering if someone can help I'm attempting to write a vbscript to check if the file size is bigger than 9,000KB if it is then msg me back the file is bigger than 9,000kb else the file is under 9,000kb.I plan on emailing myself but im fine with the email portion.
Dim maxFileSize...
i need help i tried the following in VBS to remove the filter and nothing works
.usedrange.autofilter
.Range("A1:B1").AutoFilter
both dont remove the filter in row 1
how can add borders?
With xlApp.Workbooks("Test.xls").ActiveSheet.PivotTables("PivotTable1")
.PivotSelect "Year[All;Total]", xlDataAndLabel
'THIS PART DOESNT WORK IT SPITS BACK AND ERROR
With xlApp.Selection
.Font.Name = "Times New Roman"
.Font.Size =...
how can add borders?
With xlApp.Workbooks("Test.xls").ActiveSheet.PivotTables("PivotTable1")
.PivotSelect "Year[All;Total]", xlDataAndLabel
'THIS PART DOESNT WORK IT SPITS BACK AND ERROR
With xlApp.Selection
.Font.Name = "Times New Roman"
.Font.Size =...
I got it to .PivotSelect to select the rows i want but the code craps out and doesnt format at all....any help would be great
With xlApp.Workbooks("Test.xls").ActiveSheet.PivotTables("PivotTable1")
.PivotSelect "Year[All;Total]", xlDataAndLabel
'THIS PART DOESNT...
i have most of my code created im just having trouble coverting this to work in my vbs script. can anyone help?
ActiveSheet.PivotTables("Pivot Table").PivotSelect "Year[All;Total]", _
xlDataAndLabel, True
With Selection.Interior
.Pattern = xlSolid...
Thanks jges works perfect. i was also able to figure out how to do it another way...ill post at the bottom incase other would like to see...but thanks again SkipVought and jges for all you help..im really new to writing scripts so thanks for tolerating me.
Dim xlApp
Set xlApp =...
I removed the do and loop. which took care of the loop but im still receieving the wrong msg back.. even tried using
set rFound = .Columns("AD:AD").find("FindString")
but it still sends back "Date is incorrect." when the date is there. a i missing something?
i got it running but it not giving me the correct msg its keeps saying its incorrect when it should be correct as the date is there...and its like and inifite loop
Dim FindString, Rng, xlApp, rFound
Set xlApp = Createobject("Excel.Application")
xlApp.Visible = False
xlApp.Screenupdating =...
the error im recieving is
Line:11
Char:33
error: Expected')'
code:800A03EE
also right now i use notpad to write vbscript's is there a better program to write them?
Not sure where im making my error...i ended up using a different code then i org wrote. the one i had kept looping...
if anyone can help me towards the right the right direction to get this going in vbs i would really apperciate it.
dim Dim FindString As String, Rng as range...
i wanted to check AD for yesterday's date using an if statement if the column has yest date or if it doesn't
i know in vba i have it written like so just dont know how to conver it to vbs
Sub Macro1()
For Each cell In Range("AD1:AD" & Cells(Rows.Count, "AD").End(xlUp).Row)
If...
sorry forgot to add it. at the moment all im able to do is format it. code is below.
Dim objApp, xlApp, filesys, path, OldName, NewName
Set xlApp = Createobject("Excel.Application")
xlApp.Visible = False
xlApp.Screenupdating = False
xlApp.Workbooks.Open "C:\Example\test.xls"
WScript.Sleep...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.