Tools>Options - View tab - Windows in Taskbar checkbox
HTH
Tools>Options - View tab - Windows in Taskbar checkbox
HTH
Not sure if I'll be able to help but it would be handy if you posted your macro
Not sure I understand - do you mean you want to import a text file with more than 65536 rows?
If so here's astart
Sub ImportLargeFileADO()
'Imports text file into Excel workbook using ADO.
'If the number of records exceeds 65536 then it splits it over more than one sheet.
Dim strFilePath As String, strFilename As String, strFullPath As String
Dim lngCounter As Long
Dim oConn As Object, oRS As Object, oFSObj As Object
'Get a text file name
strFullPath = Application.GetOpenFilename("Text Files (*.txt),*.txt", , "Please select text file...")
If strFullPath = "False" Then Exit Sub 'User pressed Cancel on the open file dialog
'This gives us a full path name e.g. C:\temp\folder\file.txt
'We need to split this into path and file name
Set oFSObj = CreateObject("SCRIPTING.FILESYSTEMOBJECT")
strFilePath = oFSObj.GetFile(strFullPath).ParentFolder.path
strFilename = oFSObj.GetFile(strFullPath).Name
'Open an ADO connection to the folder specified
Set oConn = CreateObject("ADODB.CONNECTION")
oConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & strFilePath & ";" & _
"Extended Properties=""text;HDR=Yes;FMT=Delimited"""
Set oRS = CreateObject("ADODB.RECORDSET")
'Now actually open the text file and import into Excel
oRS.Open "SELECT * FROM " & strFilename, oConn, 3, 1, 1
While Not oRS.EOF
Sheets.Add
ActiveSheet.Range("A1").CopyFromRecordset oRS, 65536
Wend
oRS.Close
oConn.Close
End Sub
Display More
HTH
My be completely off track here as my VBA ain't too hot but is this any use as a start?
http://j-walk.com/ss/excel/tips/tip29.htm
HTH
QuoteOriginally posted by Iridium
I have the code on my work PC to move a msgbox as a whole when the cursor gets near it if you can wait a day or two
Actually its pretty much what you were after in the first place and doesn't make thw whole thing move just the button - a userform with one button and the following code
Private Sub CommandButton1_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal X As Single, ByVal Y As Single)
Randomize
CommandButton1.Left = Int((250 * Rnd) + 1)
CommandButton1.Top = Int((170 * Rnd) + 1)
End Sub
The user will still be able to close it using the X
HTH
I have the code on my work PC to move a msgbox as a whole when the cursor gets near it if you can wait a day or two
QuoteOriginally posted by stefanjadex
Hi Andy and thank you.
Unfortunatelly you didn't specify your e-mail address, {snip}
Check the 'e-mail' button below Andy's post
I don't think I can provide anymore help to you as this is a bit out of my field now. Sorry!
Are you running your query in VBA or xl?
How 'bout using the unprotect/reprotect method in your macro?
ActiveSheet.Unprotect ("YourPassword")
'your code here
ActiveSheet.Protect ("YourPassword")
If you want to allow certain cells to be edited after this make sure you have formatted them as unlocked before doing the protection (with your selection to be unlocked Format>Cells... - Protection tab and uncheck 'locked')
HTH
I should have said these two macros go in the ThisWorkbook module as opposed to a standard module
Private Sub Workbook_Open()
Application.DisplayFullScreen = True
End Sub
Private Sub Workbook_BeforeClose(Cancel As Boolean)
'Saves file as what is in cell "A1" to specified network location - variant below
Dim Location, ThisFile As String
Location = "\\directory\subdirectory\"
ThisFile = Range("A1") & Format(Now(), "dd/mm/yy")
ThisFile = Location + ThisFile
ActiveWorkbook.SaveAs filename:=ThisFile
End Sub
Have a look at this too http://j-walk.com/ss/excel/tips/tip06.htm as "trying to open auto open a file in full screen mode and also fit to users screen, which I guess is the same thing?" isn't necessarily true
HTH
Try searching the CDs for 'atpvbaen' but is it not listed if you go to Tools>Addins... in xl?
Just for info as you said you have your timer bit sorted have a look at http://www.xl-logic.com/xl_files/vba/active_clock.zip (though it pretty much renders undo useless btw)
How 'bout you recalculate the workbook periodically using Application.Calculate which will cause the TODAY function to update
To call a macro periodically see http://support.microsoft.com/d…aspx?scid=kb;en-us;213288
HTH
Random ideas
1) remove the toolbar
2) disable right-clicking
3) capture the ctrl+p event and override it (onkey?)
HTH
May have misundestood but wouls =TODAY() somewhere in the s/s not suffice?