CE Scheduler To Print Daily With Running Date
Hi,
We are using CE Scheduler (8.0) to handle our scheduled reports...
We wanted to develop a ASP/CSP handle request from users to schedule the reports themselves.
We've got an issue whereby if the user schedule a particular report to run daily, the date parameter capture from the html will always be fixed even printing for different day. to illustrate:-
user scheduled to gen rpt daily via html on 16apr03
Date run / Date of data 16apr03 / 16apr03 17apr03 / 16apr03 18apr03 / 16apr03 19apr03 / 16apr03
in short, we are having difficulty telling the CE to dynamically capture the data on the same date as the day the report is scheduled to run....
Has anyone has the same problem and does anyone know the solution to this??
Much appreciate if anyone could provide assistance..
our thanks in advance...
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Running A Daily Job From The Windows Scheduler
I have read a number of threads concerning the Scheduler (including this which is quite detailed: http://www.tek-tips.com/viewthread.cfm?qid=794484), but I cannot see how to code my program to add a scheduled task to run at a specific time daily.
Do I have to setup a task for each day of the week with JOB_RUN_PERIODICALLY, or is there a simpler way?
Also, I notice that in a Scheduled Task's settings, it is possible to stop the task if it runs for a certain period. Can this be programmed as well?
Any help would be appreciated.
Automatically Running Programs On A Daily Basis
Hi all,
This isn't really a VB question but all you guys seem so clever I thought I'd ask you, hope you don't mind. So....
Is there a way of running a program, for example a batch file, automatically on a daily basis? I've created a program for the company that I work for that creates reports on the server but these have to be FTP'd over to the client then printed, and they're needed every day. As the people that require the reports aren't very computer literate it would be great if the files were just sitting on their PC when they get to work. I've created the batch file that FTP's the files and opens them, but can it be set to run automatically?
Thanks guys....
Using MonthView To Print A Daily Calendar?
Hi,
I am trying to make a "simple" Program that will print out each day(s) Activities.
The User would select the Day(s) to edit, click the Edit Button to make changes, and then click the Print Calendar Button to Print all 28-31 days on seperate pages. The Form/File to be Edited has to be like a Form so that it is easy to use (non-computer people :-).
Can I do this with MonthView?
If so Then...
I have a form with the MonthView Control, 4 Command Buttons ( Edit Calendar, Select All, Print Calendar and Exit).
Questions:
1. Do I use formatted Forms with RichText Boxes, or Files (like .doc formatted with text boxes) for the days?
2. Do I have to make all 31?
I have not found anything like what I want to do... I am NOT looking for someone to "do" it for me, I just want to make sure that it can be done, and get a little insight. Then I will worry about "how to do it"!
Any help will be appreciated!
Don Carpenter
How To Get An Excel Looking Daily Schedule To Print From VB6
I'm new to this board, but not programming. I've been working on quoting a job for a couple of days. It's kind of like a turin test. It's easy for a 5 year old to do (granted, laborious), but difficult for a computer to do.
Not impossible, just a lot of variables and special conditions. I've figured most everything out, but the end result is a printout of the next day's class schedules. Preferrably a new page per class.
Now I'm self taught, and have been programming since B.A.S.I.C. on the TRS-80, so this could be something I missed in VB 101.
I need to create something like this, that fits on paper to be printed (or prints automatically without screen view)..
Class #: xxxx
Class Name: My Class
--------------------------------------------------------------
Student Name | (blank for sign in) | time in | etc.
--------------------------------------------------------------
Student Name | (blank for sign in) | time in | etc.
--------------------------------------------------------------
ad infinitum... (or to bottom of page, then gen new page with header, continuing where left off...)
The customer I'm quoting, is tired of writing in the student names by hand. I've figured how to compute who's in what class, when, but I've never had to print something out 'pretty' before.
Any help would be appreciated..
A URL, an object name, a smack upside the head. <g> I hate feeling stupid. I have no problems figuring out logic/syntax for problems, but have never walked this particular road before. <sigh>
Thanks for any help...
Chris "Blue Dragon"
Urgent!!!!! Placed In Task Scheduler But Not Running As Expected!
Hi everyone,
I've placed my working application in the Windows Task Scheduler to run it at a certain time interval. Though my application executes at the assigned time, its status on the Task Scheduler is always displayed as "Running", it seems to me that the program is running non-stop. However, everything works well when I manually execute the application, it runs correctly and unloads within a minute.
Can anyone tell me why is this so? How am I able to resolve it? Besides placing in the Task Scheduler, is there other ways that I can run my program automatically at any particular time?
Thank you very much.
Permission Denied Error Running VB App In M$ Scheduler
Hi Guys!!!
I have develop an VB6 application that takes an EXCEL file from FTP Server and put it in a folder on the local Server, then it takes the EXCEL and add a new sheet to the EXCEL file with data and save it, imports that data to an sql database.
The problem I am having is it does not run completely in the scheduler, I have compiled the application to a EXE and ran it manually and it works fine but when the EXE is scheduled it bombs out in the application where I need to write to the Excel file. The error is Permission denied. The application takes it the file from the FTP to local server and opens it, but when it want to write to the file it goes? I have FULL CONTROL permissions on that folder so it cannot that.
Anyone have some ideas?
Exe) Stays Running In Memory After I Print
I wrote a small program to print a simple form in VB.
The program (exe) runs great but when I close the form using Unload as below the (exe) stays running.
This only happens when and if I print. If I don’t print the (exe) closes fine.
This is how I am printing the datareport
rptdatareport.PrintReport True, rptRangeFromTo, 1, 1
This is how I am closing
Private Sub Form_Unload(Cancel As Integer)
Dim i As Integer
Dim y As Integer
datCompanyData.Database.Close
frmSplash.Show
frmSplash.Refresh
For i = 1 To 9000 '23000
For y = 1 To 20000
Next y
Next i
Unload frmSplash
Unload frmCertificate
End Sub
Can anyone tell me why my (exe) stays running in memory after I print and close?
Print Screen When Program Is Running
hi, can anyone help me? I need to printscreen when my code is running, since i need to show the changes it in my report. but when i press print screen, and try to paste it to clipboard, nothing happen? How do i go about this?
Please help, thank you.
Can I Print A (running) Userform To A File?
I want to print a running Userform to a file,
so that I can load it as a picture object into an MS Project slide.
Print screen to the clipboard doesn't give me a clear enough image (for zooming etc)
I can run the form direct from Project, but this takes to long..when I need a slick presentation
Is there any alternative to the clipboard, or
using printform method to a printer?
Getting Print From Running Of Stored Procedure
Hi,
I have a couple of stored procedures running on SQL Server 2000 that outputs some debug data that's really important for debugging my VB6 application.
Is there any way I can catch these outputs when running a ADODB Command in runtime? One of the procedures returns a Recordset in addition to two output parameters, but I want the print output I can see when I use SQL Query Analyzer...
graabein
Run Vb6 App Daily
Hi all
Just wondr if there is a way to run a vb6 app daily. I need to run it at 12:30 AM, but it also runs at 12:30 PM also when i compare with times. Also, the timer control only has 65 seconds. Any ideas?
Running Into Problems With Infinite Loop With A Print Until EOF
Okay, I'm trying to get a file with a list of entries to display onto a list box. I've tried displaying to a picbox, txtbox, and it still infinite loops. What am I doing wrong?
Private Sub cmdDisplayLogs_Click()
Open "login_activity.csv" For Input As #1
Input #1, FirstName, LastName, IDNumber, LogDate
Do While Not EOF(1)
lstLoginActivity.AddItem (FirstName & ", " & LastName & ", " & IDNumber & ", " & LogDate)
Loop
Close #1
End Sub
It ends up printing the first entry of the log file a zillion times over until the whole program crashes. Why isn't it proceeding to the proceeding entries until the EOF?
Daily Maintenance
I have a program in VB6. The program is installed in 4 XP machines. the Database is stored in a NT Server. The program uses ADO code ( not control ). All the 4 XP users are users in NT servers.
The program is on through out the day and many times it accesses the DB for read and write operations. The DB is Microsoft Access.
I want to write a small code in the program which copies the database in the client machine once in a day ( when the programs starts first time). The code would check the date of the file of the Backup and the original Database. So that if there is any crash of the DB, we will have atleast backup of the data upto the previous day.
Could someone help with VB 6 code ?
Daily Report
I need to build an application that collects info once per day. I'm thinking about building a timer that would check for the day to change every hour ? and would then run the report when the day changes...I am wondering if there is a better way.
Save .txt Daily
Please bear with me, although I'm not a beginner, I'm a little new to this particular type of VB coding.
I'm trying to create a batch executable that runs daily and renames a text file as 07232002.txt, 07242002.txt, etc... I would use the DOS constant %date% to supply a parameter to VB.
I already have code to written to strip the "/" from the date using VB code, however I'm not sure how to get the stripped date back to DOS to rename the file.
If you know of a better way to do this or have a solution, please let me know. Thanks for your help.
Daily Issue
I'm creating a political simulation game where I need a "daily issue" feature. What I mean by that is every time a user logs on there is an "issue" for them to work on. I just need help on how to have a new issue come up every time a user logs on to their account.
Daily Function
I have a function that I want to run once every day i.e. every 24 hours, whats the best way of achieving this, I'm not sure a timer can be used for such a long period, and it seems a bad way todo it even if it does, any thoughts?
The Last Date A Macro Have Been Running
I ask i f any knows how can I make a simple command that show the last date for one macro (or Buttom) have been pulsed (or run).
if any know I'll appreciate it.
Creating Daily Events In A VB App
I have a customer that wants to have their Cisco equipment backed up at, for example, 4AM Tuesday, and then 12AM every other day. I told them I might be able to find something, but everything I find is at a price. So, a quick download of VB2005 Express later and I'm almost done with what they want. I can initiate a socket, push data down and parse the results. My problem is setting up the automated part of the program. This is my first time through a VB app, and while it's easy searching google and these forums didn't reveal anything revealing. (I may be wrong, I have terrible eyesight :P)
Here's the specifics:
I need to have it decide to backup based on the Day(Sun-Sat) and a time for each day.
I need to have a Timer(guessing here) on an interval, to check 'is it x(day) @ y(hour)', and if that returns true execute the backup function.
I can handle most of it really, I just need to figure out timers and if there's an easy way to resolve the day.
Daily Report For A Range
hi~ pls help to give me some ideas if you could...
many thanks
1> i have a VB / Crystal report which could be run according to 2 users defined dates, which will display the sum of each items between the 2 dates. Now i need to change it so it could generate the daily report between 2 dates.
could anyone give me some suggestion how i should start please ?
i also wondering if i could use date for Loop ??
2> how could i display a Variable field (which is user input field in VB) on Crystal Report ??
thanks very much~
Daily Work Schedule
I'm looking for some advise on how to build a daily schedule for employees in my database.
I'm somewhat new to vb, i'm see addin apps like gravitybox that work like outlook i like these but would prefer to write my own or at least have more flexability
i'm building a database for a dance studio i've already recieved lots of great help here so thanks
i would like the schedule to show a daily list for each teacher and the lessons they have for the day
teachers john sam mary michelle
12:45 Jones
1:30 Smith Simms Park
2:15 Mills Park
3:00 Young Bastin Fuller
3:45
4:30 Lunch Lunch Thomas Lunch
and so on
as you notice we work on a 45 min time schedule this is where it would be better for me to make somthing new so the receptionist would just have to click the appropriate text box a form would pop up she could select a student from a drop down list and save
i've allready started build the form to show the schedule
but not sure as to the best way to load and save to database
any help would be great thanks
Best Way To Start A Daily Log Project
Hi there,
I'm just a bit lost as to the best way to start this project. My company wants to convert from hardcopy daily logs to an electronic log program so that we can cut down on the massive amount of paper we use and the storage space required for keeping logs on hand for a mandated 1 year past the closing date.
The various departments have logs tat run for a 24 hour period, and depending on how busy we are, may be 5 to 8 printed pages long.
Would it be better to create up to 8 forms as separate pages of the log and try to save only the ones with entries on them, or is there some way to temporarily save the information on a form, then clear it and continue with the log until the 24 hours is up, then save all the information into one file? I'm afraid I'm a bit rusty, as I haven't done any VB coding for about 5 years. I am using VB6.
Best Way To Fire Event Daily?
I have a small app that has to run every morning at 7AM. What is the best way to go about this? Should I have a timer that fires every minute checking the day? Or should I use an API timer? Or is there some way to make it run at a specific time every day? Also, if it doesn't run on a weekend, that would be great.
Any thoughts appreciated.
How To Schedule A Function Daily?
How can i effeciently and foulproof schedule a certain function in VB - Daily ?
A great plus would be if the enduser can assign wich time every day this function would fire.
Chances are that this function can fail doing what it should, and therefore the schedule should keep trying every 10 minutes until it succeeds each day.
Any ideas/suggestions to what i should do, or how i should think would be greatly appreciated. Codesnippets are even more appreciated
Best Regards / Rickard.
Daily Stumping???? Setup???
wheni go to my support folder and click on setup1.exe i come up with an error
"Invalid line control- parameters.unable to continue"
any ideas why this error comes up im stumped??????
Daily File Generation?
I'm trying to develop a VBscript that will take the contents from a web-based FORM and append the data to a single text file each day. The kicker is that the file compiles only 24hrs of inputs from the form then saves the file to a folder on the server then starts up a new file with the same results creating a "file per day " structure.
such as:
"data8-31-00.txt"
"data9-01-00.txt"
and so on.
Does anyone know a way that this can be done?
im stumped and my head is spinning. Any help will be appreiciated.
Thanks
Daily Database Backup
This is puzzling me.
In my application I wish to backup an access database the first time a user opens a form each day.
At random times this will work more than once a day. (My quess is that something is going astray when I check the file dates). Also, it takes a long time on some user's PC and a short time on others. (Have no clue why this would be!)
(Operating system is windows 2000 - Access 97 - using VB 6 language)
Here is the code:
When the program is first loaded:
Code:
DateTime = Format(FileDateTime("C:RoutingsBackupeRoutings_backup.mdb"), "mm/dd/yyyy hh:mm AMPM")
FileDate = CDate(Left(DateTime, 10))
'capture current date
SystemDate = CDate(Format(Now, "mm/dd/yyyy"))
'if they are the same, no need to backup again
If FileDate = SystemDate Then
backup = False
'database needs to be backed up locally
Else
backup = True
'Here go to Access to retrieve latest snapshot of data and store the returned Process ID.
mlngProcessHandle = Shell("C:Program FilesMicrosoft OfficeOfficeMSACCESS.EXE S:GroupEngeRoutingseRoutings_database.mdb", vbHide)
'Based on the original Process handle, we generate a new Process handle
'(but not a new process) that has terminate rights.
mlngProcessHandle = OpenProcess(PROCESS_TERMINATE, 0, mlngProcessHandle)
End If
When the form is opened that would trigger the backup:
Code:
'only backup if this boolean option is set to true (first time opening today)
If backup = True Then
'copy database for backup purposes
RepairEntry.Show
With fileop
.hWnd = 0
.wFunc = fo_copy
.pFrom = "S:GroupEngeRoutingseRoutings_database.mdb" & vbNullChar & vbNullChar
.pTo = "C:RoutingsBackupeRoutings_backup.mdb"
.lpszProgressTitle = "Please wait, backing up eRoutings database locally....."
.fFlags = FOF_SIMPLEPROGRESS Or FOF_NOCONFIRMATION
End With
lret = SHFileOP(fileop)
'We Call Terminate Process with the process handle that has terminate rights.
'If the API return a 1, then the function completed without error.
TerminateProcess mlngProcessHandle, lngExitCode
End If
declarations (in a main module)
Code:
Public conn As Connection
Public rsDetails As ADODB.Recordset
Public NewRec As Boolean
Public RevRec As Boolean
Public InProcess As Boolean
Public Update As Boolean
Public backup As Boolean
'variables and structures required to backup the database
Public lret As Long
Public fileop As SHFILEOPSTRUCT
Public Type SHFILEOPSTRUCT
hWnd As Long
wFunc As FO_Functions
pFrom As String
pTo As String
fFlags As FOF_Flags
fAnyOperationsAborted As Long
hNameMappings As Long
lpszProgressTitle As String 'only used if FOF_SIMPLEPROGRESS
End Type
Public Enum FO_Functions
FO_MOVE = &H1
fo_copy = &H2
FO_DELETE = &H3
FO_RENAME = &H4
End Enum
Public Enum FOF_Flags
FOF_MULTIDESTFILES = &H1
FOF_CONFIRMMOUSE = &H2
FOF_SILENT = &H4
FOF_RENAMEONCOLLISION = &H8
FOF_NOCONFIRMATION = &H10
FOF_WANTMAPPINGHANDLE = &H20
FOF_ALLOWUNDO = &H40
FOF_FILESONLY = &H80
FOF_SIMPLEPROGRESS = &H100
FOF_NOCONFIRMMKDIR = &H200
FOF_NOERRORUI = &H400
FOF_NOCOPYSECURITYATTRIBS = &H800
FOF_NORECURSION = &H1000
FOF_NO_CONNECTED_ELEMENTS = &H2000
FOF_WANTNUKEWARNING = &H4000
End Enum
Public Declare Function SHFileOperation Lib _
"shell32.dll" Alias "SHFileOperationA" _
(lpFileOp As Any) As Long
Public Declare Sub CopyMemory Lib "kernel32" _
Alias "RtlMoveMemory" (hpvDest As Any, hpvSource _
As Any, ByVal cbCopy As Long)
'used to autocomplete combobox
Public Const CB_FINDSTRING = &H14C
Public Const CB_ERR = (-1)
Declare Function SendMessage Lib "user32" Alias _
"SendMessageA" _
(ByVal hWnd As Long, _
ByVal wMsg As Long, _
ByVal wParam As Long, _
lParam As Any) As Long
'used to shell and terminate to other functions
'OpenHandle Desired Access Constants.
Public Const PROCESS_TERMINATE = 1
'Required APIs to terminate other functions.
Public Declare Function TerminateProcess Lib "kernel32" (ByVal hProcess As Long, ByVal uExitCode As Long) As Long
Public Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal dwProcessId As Long) As Long
'External Process Handle.
Public mlngProcessHandle As Long
Public lngExitCode As Long
Any help would be greatly appreciated. So far as I can tell checking the file dates should work!
Thanks,
dmh4ab
Daily Password Generator
This application is use to generate a new id daily.
please contact for more daily password generators.
Srinivas M.P.
srinu_pillalamarri@yahoo.com
Help With Charting Daily Information
Hello,
I'm currently working on a data collection project which uses VB 6.0 and an Access DB.
The program writes data to the Access DB every 1 second and give information such as shift time, current product being run, as well as production time and "down" time. I have everything properly reading and writing between Access and VB but I still need to making a graph application which visually can show this data.
What I have done so far with this is I have added a search parameter for the start date and end date. So, if someone wants to see a chart that contains information from say, 3/4/2006 to 3/18/2006 then they just select these dates, hit submit and the chart generates the requested information (operation time) in rows of days. I have an ADO sorting through the days requested but I don't know how to takes these days and have them chopped up into separate days for graphing. I was thinking of doing multiple sorts that took the first day of the search, sorted that day only, totaled up all the operation time, stored it, and then incremented one day, sorted that day, etc - to the very last day of the search. However, I don't know how to do this or if it is even possible. If extra information is needed please let me know. Thanks.
Running Stopwatch With Date && Time
Hello All,
I am working on a stopwatch program to record times for various job's
and am having trouble setting the start and stop to count off the date & Time
any info would be greatly appreciated
So far I have txtDate & TxtTime set to systemtime
VB Code:
Private Sub Timer1_Timer() txtDate = Date txtTime = TimeEnd Sub Private Sub Form_Load() Timer1.Enabled = True EmpClock.Enabled = TrueEnd Sub
and then I am usin cmdStart & cmd Stop
and txtStart , txtStop, & txtTotal wich will be of course txtstarttime + txtstoptime
the issue is setting start & stop off the txtTime
this is what ive got on this part so far
VB Code:
Dim hour As SingleDim min As SingleDim sec As Single Private Sub cmdStart_click()EmpClock.Interval = 1000'Need Something to Help Start timer off current time txtTime and place into txtStartEnd Sub Private Sub cmdStop_Click()'Need Something to Help Stop Timer and take current time & place into txtStop then I should be able to find the difference and place into txtTotalEnd Sub Private Sub EmpClock_Timer() If min = 60 Then hour = hour + 1: min = 0If sec = 60 Then min = min + 1: sec = 0 txtStart.Text = Format(Str(hour), "00") & ":" & _Format(Str(min), "00") & ":" & _Format(Str(sec), "00")txtStop.Text = Format(Str(hour), "00") & ":" & _Format(Str(min), "00") & ":" & _Format(Str(sec), "00")txtTotal.Text = Format(Str(hour), "00") & ":" & _Format(Str(min), "00") & ":" & _Format(Str(sec), "00")End SubPrivate Sub cmdReset_Click()txtStart.Text = "00.00.00" txtStop.Text = "00.00.00"txtTotal.Text = "00.00.00"hour = 0min = 0sec = 0End Sub
thanks for any help on this
Program Running Date&& Time
IM DOING A PROJECT AT SCHOOL AND I NEED TO HAVE THE DATE & TIME SHOWING AND RUNNING. I NEED THE CODE TO DO THIS. PLEASE HELP THIS IS A VERY IMPORTANT FINAL PROJECT..
Automatically Update .exe If Running .exe Is Out Of Date
We have a vb6 program that is used at several clients around the US. The .exe is changed fairly regularly and I've been asked to find a way to have the program
1. Check and if a new version is available. I can do this currently based on the version in the program and the current version in a file the program reads every time it starts.
2. Go to our web site. The program already has code to do this.
3. Download the new version from the website. I can already do this, but I don't know where to put it.
4. Somehow shut the program down.
5. Start the program back up with the new .exe.
Steps 4 and 5 are beyond my experience at this time.
I would appreciate any help or code that would lead me through what I need to do.
Thanks....
Paul
In Need Of Some Command Help {downloading Web Page Daily}
Hi,
Im trying to write a program for my brother to help with his homework. I need a command that can download the same webpage everyday. Ive tried making a macro in VB with appactivate and sendkeys but it only works like half the time. Is there a simpler command that I could use to do this. Thankyou for any help =)
Updating File On Daily Basis
Hello,
I have a daily report, I know how to get the value from a file by using the following function
D9= INDIRECT("[" & I2 &".xls]report!$G$6")
it will grasp the value from the file saved with the name written in "I2".xls
I struggle to put the loop in order to jump from one day to another. I can open and close the file to update the first column but i cannot find the solution to update all the data for all the month ( from 01022006 to 28022006.
I use the "while" function but i think i dont have the right code:
While Aday < "28022006"
Workbooks.Open Filename:= _
"C:Documents and SettingsMCH9741My DocumentsProductivityWeekly reportsDaily reports" & datem & ".xls" _
, UpdateLinks:=0
Windows(datem & ".xls").Activate
ActiveWindow.Close (savechanges = False)
WendWith "datem" wich is the variable which would allow to jump from one day to another.
max.
I Need To Save Daily And Weekly Values, How Can I Do Them?
I have an application, that has so many controls: Weekday,Date,... I need to save all the weekly values from all these control arrays to a file at the end of the week.
Anyone knows how i can go about this? At the moment the values display each week. Also I need to keep track of daily start and end times and sum them at the end of the week and save them to a file, how can i achieve this?
Weekly Reports From Daily Data
I want to write reports in a fitness database that takes entries on a daily basis based on a week compared to other weeks. Measures I can think in terms of are rank the weeks for the year in terms of caloric intake for each week. Or rank the 10 worst weeks for Heart Rate during the course of a year. How about the months with the most fat intake. How do I aggregate days into weeks? I'm thinking Sunday to Saturday weeks but treating every 7 day increment possible is useful as well. How is this done?
Mick
Date Formats In Excel After Running Macro
Dear All
I have developed some code which takes data from a spreadsheet, formats it and saves it as a csv file.
I have hit a problem with the date format. The output comes back as excel time stamps rather than date and time formats (dd/mm/yy hh:mm:ss).
I have tried several methods of using some formatting to change but it does seem to work. Could someone suggest a change? Code posted below
Code:
Dim Obj1 As Object
Dim Obj2 As Object
Dim UserList()
Sub RunMe()
Dim Str1 As String
Dim myPath As String
Dim i As Integer
Set Obj1 = CreateObject("excel.application")
myPath = "C:Test" 'please note you should a "" at the end.
Str1 = Dir(myPath & "*.xls")
Set Obj2 = CreateObject("excel.application")
Do
Obj1.Application.DisplayAlerts = False
Obj1.Workbooks.Open (myPath & Str1)
'For i = 1 To UBound(userslist)
'If Obj1.ActiveWorkbook.BuiltinDocumentProperties("Author").Value = userslist(i) Then
Call Macro1Bis 'or do whatever you want with the file
' Exit For
'End If
'Next
Obj1.ActiveWorkbook.Close
Obj1.Application.DisplayAlerts = True
Str1 = Dir()
Loop Until Str1 = ""
Set Obj1 = Nothing
Set Obj2 = Nothing
End Sub
Sub Macro1Bis()
Dim a
Dim Str1 As String
Dim Str2 As String
With Obj1.ActiveWorkbook.ActiveSheet
.Range(.Cells(2, 15), .Cells(2, 5).End(-4121).End(-4161).Offset(0, 2)).FormulaR1C1 = "=RC[-10]+RC[-9]"
.Range(.Cells(2, 16), .Cells(2, 15).End(-4121).Offset(0, 1)).FormulaR1C1 = "=RC[-7]"
a = .Range(.Cells(2, 15), .Cells(2, 16).End(-4121))
End With
Obj2.Workbooks.Add
With Obj2.ActiveWorkbook.ActiveSheet
.Range(.Cells(6, 1), .Cells(5 + UBound(a), UBound(a, 2))) = a
.Cells(5, 1) = "Time"
.Cells(5, 2) = Obj1.ActiveWorkbook.ActiveSheet.Cells(2, 3)
Select Case UCase(.Cells(5, 2))
Case "PRESSURE": Str1 = "01"
Case "FLOW": Str1 = "02"
Case "LEVEL PERCENT": Str1 = "03"
End Select
.Cells(5, 3) = Obj1.ActiveWorkbook.ActiveSheet.Cells(2, 4)
.Cells(2, 1) = "Site Name"
.Cells(2, 2) = Obj1.ActiveWorkbook.ActiveSheet.Cells(2, 1) & "_" & Obj1.ActiveWorkbook.ActiveSheet.Cells(2, 2) & "_" & Str1
Str2 = .Cells(2, 2)
Obj2.Application.DisplayAlerts = False
Obj2.ActiveWorkbook.SaveAs Filename:="C:Test" & Str2, FileFormat:=xlCSV, CreateBackup:=False
End With
Obj2.ActiveWorkbook.Close
Obj2.Application.DisplayAlerts = True
End Sub
Daily Schedule Using Info From Excel File (Possible??)
I search and could find anything about it so I'm not real sure where to put this thread but...
Here's what I am trying to do.
I want to create a program that can read a date, start time, and end time from multiple excel file and list the activities for each day in a form of a calendar?
Confused??
Okay let me try again
I work at an ice arena and there are several long-term users that contract ice time. Each user group gets an excel file which the group will list each date and time that they want to use rink. I would like to be able to read these excel files from each group and make a day-by-day schedule/calendar to view conflicts of time (i.e. two users want the ice at the same time).
Is this possible and how would you suggest to start?
Here is my excel form i am working with
What Is The Easiest Way To Schedule / Daily / Weekly Ftp Transfer
Hi,
Could you please give me suggestions of what is the easiest way to schedule ftp download.
I have a website that I manage, and I want to have a daily backup of the files and folder..
Could anyone help me?
is it fairly simple to create a VB script or VB application that will do this..
Thank you..
Daily Schedule Using Info From Excel File (Possible??)
I search and could find anything about it so
Here's what I am trying to do.
I want to create a program that can read a date, start time, and end time from multiple excel file and list the activities for each day in a form of a calendar?
Confused??
Okay let me try again
I work at an ice arena and there are several long-term users that contract ice time. Each user group gets an excel file which the group will list each date and time that they want to use rink. I would like to be able to read these excel files from each group and make a day-by-day schedule/calendar to view conflicts of time (i.e. two users want the ice at the same time).
Is this possible and how would you suggest to start?
Problems With Different Date And Time Formats When Running Setup
Hi,
I have done a setup.exe with the package wizard coming with VB 6.0. i have now enountered some problems when doing the setup that had a different time and date format than what I had on the computer where I did the setup.exe. is there a way i can avoid this, that it would not be dependant on that?
Is there a wy to do a more professionally looking setup program than the one in VB 6.0, it looks very unfashionable..
Thanks!
Error In Running The Select Query Having Date Clause
Code:"insert into new_rec SELECT * FROM student where From_Date = # " & Format(DTPFrom & " 00:00:00", "dd/mm/yyyy hh:mm:ss AMPM") & " # AND To_Date = # " & Format(DTPTo & " 23:59:59", "dd/mm/yyyy hh:mm:ss AMPM") & "#"
I am accessing the data from sql server 6.0 . Iwant to display the data lies with in date which i selec from DTPicker that i have used on my vb form but this query shows the syntax error
please provide some help and check this query
Edited by - Geof on 3/10/2008 4:05:10 AM
Print Date On Excel Worksheet
Im fairly new to VB and i would like to know if there is a way to print the date (system date in my computer) in an excel worksheet, using a standard exe.
Also, i have also made a program in a standard exe that when you click the command botton, it automatically opens a couple of word documents, does a process, opens an excel workbook, and writes down the result of the process on the workbook, it then closes all documents and saves the changes on the workbook.
The problem now is that after closing the workbook, excel is still running inthe background. I've tried using "excel.application.quit", but it does not completely close excel. What should i do??
Print Data Between A Date Range
I have a data base with a long list of enteries which I would like to beable to use a macro to print enteries between to dates. If having it print is to hard how do I get to copy the enteries between the dates to a new worksheet
Print Msflexgrid With Title And Date
I wants to print date + title and also msflexgrid content.
In this case also flex grid content is being printed.
What is wrong in my code?
VB Code:
Private Sub Cnd_Print_Click()Printer.Orientation = vbPRORLandscapePrinter.Print Date & " " & TimePrinter.CurrentY = Printer.ScaleHeight / 10Printer.FontSize = 14Printer.FontBold = TruePrinter.Print "My title"Printer.Print ""Printer.FontBold = FalsePrinter.PaintPicture MSFlexGrid1.Picture, 0, 0Printer.EndDocEnd Sub
|