Search results

  1. ChrisO

    Question Excel - Late binding

    Pat. The code I posted in post #18 worked when tested and it also produced black positive numbers and red negative numbers. I don’t think you want to sum columns H and J because they are formatted as dates as in:- ' Set format for date columns wksNew.Columns("H").NumberFormat = "d-mmm;@"...
  2. ChrisO

    Question Excel - Late binding

    The calculated cells:- ' Set calculated cells formula. strCol = "I" .Cells(lngRows, strCol).Value = "=SUM(" & strCol & conHeaderRows + 1 & ":" & strCol & lngRows - 1 & ")" strCol = "K" .Cells(lngRows, strCol).Value = "=SUM(" & strCol & conHeaderRows + 1 & ":" & strCol & lngRows - 1 & ")" Last...
  3. ChrisO

    Question Excel - Late binding

    And here is something else that may be of interest in using constants in either early or late bound code:- http://www.access-programmers.co.uk/forums/showthread.php?t=241058 It is a secondary consideration but it does supply Intellisense with constants. (A demo of the FE is attached if you wish...
  4. ChrisO

    Question Excel - Late binding

    Brian. First up let me say I know far less about Excel than most people and that is because I have seldom used it. In this case, however, I do not need to know very much about Excel; all I need to know about is late binding. You see, Pat posted the early bound code and said it worked. Pat also...
  5. ChrisO

    Question Excel - Late binding

    Hi Pat. I do get bored at times… The following is a late bound version of the early bound version you supplied. It will run without any references at all, except the two we can’t remove. It does not matter if Excel is referenced, the code simply doesn’t use it. There are two or three things...
  6. ChrisO

    Question Excel - Late binding

    Hi Pat. Please bear with me because I don’t know much about Excel late binding. All of the following code was tested in Access from this procedure:- (I had to change the file extension to XLS.) Sub TestIt() Dim strFileName As String Dim txtExcelQueryName As String Const...
  7. ChrisO

    Question Excel - Late binding

    Pat. ' 0 if Late Binding ' 1 if Reference to Excel set. #Const ExcelRef = 1 #If ExcelRef = 0 Then ' Late binding Dim objXL As Object 'Excel Object Dim objWkb As Object 'Workbook Object Dim objSht As Object 'Sheet Object Dim objTemplate As Object 'Workbook Object for...
  8. ChrisO

    OnGotFocus event

    Is PostItGotFocusHandler2() a Function or a Sub? Chris.
  9. ChrisO

    Collections Class on continous forms

    Well, this was fun…. I think I’ll have to call this Grouped Forms rather than Continuous Forms. Anyway what it amounts to is one subform per record and in this case that means 8 subforms. Of course there can be more than 8 records; it’s just that only 8 are visible at any one time. That also...
  10. ChrisO

    Error handling A 2013

    I doubt it… :D Chris.
  11. ChrisO

    Collections Class on continous forms

    By no means with “negative waves” but I don’t think you will be able to find a way to do it in a normal Access Continuous Forms (ACF). I mean that in a positive sense because a lot of time can be wasted on looking for something which doesn’t exist. If it existed then someone would know about...
  12. ChrisO

    Collections Class on continous forms

    Continuous Forms are just a concept that the user doesn't really want or need to know about. So all we have to do is make it look like a continuous form to keep them happy. Drag, drop, resize and save on what looks like a continuous form. It is going to take a lot more work but it's doable...
  13. ChrisO

    How can I tell what the calling event is?

    Bhavdahl. What precisely is it that you are trying to do? At runtime you can not determine the name of the calling procedure, not even the active procedure. You can pay for it but, as far as I know, not get it for free. Even passing the name of the calling procedure would not be sufficient...
  14. ChrisO

    DYNAMIC Short Cut Menu

    GUIDO22. The Shortcut Menu Bar in that demo is dynamic in as much as it is deleted and recreated on each call. You can see it in the code:- ' Delete the Shortcut Menu if it already exists. Application.CommandBars(CStr(!ShortcutName)).Delete ' Make a new Shortcut Menu by the same name. Set...
  15. ChrisO

    Table level validation

    I don’t wish to get off topic here but primary safety these days is most likely entrusted to a spring. There was a time when gravity was the primary safety but that had consequences which we do not need to go into here. Another method is to triplicate the safety circuit so that if any one of...
  16. ChrisO

    Table level validation

    Is not the original question a bit strange; who would accept an aircraft takeoff weight based on an Access database? Surely such a thing would be governed by some regulatory body or, at the very least, the aircraft manufacture. It’s a whole lot more complicated than just passengers verses...
  17. ChrisO

    Whats better new module new function or all functions in one module?

    Two unrelated ways of looking at it. 1. When you store a file on disk do you always create a new directory for it? 2. If your Functions are in separate Modules and you want one Function to call another then the called Function would need to be Public. Very often you will have one Public...
  18. ChrisO

    Is VBA a must?

    Apart from what has already been said I think learning VBA, or any programming language for that matter, is a good thing because it causes us to focus on the detail of the logic at hand. The very best thing to test our ability to think correctly is a computer language compiler because the...
  19. ChrisO

    Access permission on tabs.

    Attached is an Access97 demo which has been converted to Access2003. Depending on current user name the Tabs are either shown or removed. It’s a simulation which allows you to test the code. Normally it would set the Tabs just after login. There is also a Form for ‘Admin’ to configure who gets...
  20. ChrisO

    Trying to split a dashed number into multiple columns

    I think that if it is going to be called from a Query the code should at least be able to handle a Null being passed to it:- Public Function SplitValue(ByVal Value As Variant, _ ByVal Index As Long) As Variant If Len(Value) Then SplitValue = Split(Value...
Back
Top Bottom