Wednesday, September 13, 2006

Apuntes del True DBGrid


* Para agregarle al grid figuras:

If Grid.Columns(2).Value = "1" Then
Grid.Columns(2).Style.BackgroundPicture = LoadPicture("C:\Prince Software\Softmatric\true.bmp")
Else
Grid.Columns(2).Style.BackgroundPicture = LoadPicture("C:\Prince Software\Softmatric\false.bmp")
End If

Sunday, June 25, 2006

Full Excel VB6.0

Convert Column Position Numbers to Column Letters

Function ColumnLetter(rng As Range) As String
'Precondition:
'- range is a single cell, range or column
'- range is Row is not allowed (returns the rownumber)
'Testcases:
'Debug.Print ColumnLetter(ActiveSheet.Range("b1")) '>>B
'Debug.Print ColumnLetter(ActiveSheet.Range("bb1:bc1"))'>>BB
'Debug.Print ColumnLetter(ActiveSheet.Columns(2)) '>>B
'Debug.Print ColumnLetter(ActiveSheet.Columns(31)) '>>AE
'Debug.Print ColumnLetter(ActiveSheet.Columns(31)) '>>31
Dim strAddress As String
strAddress = rng.Address
' Because .Address is $$, drop the first
' character and the characters after the column letter(s).
ColumnLetter = Mid(strAddress, InStr(strAddress, "$") + 1, InStr(2, strAddress, "$") - 2)
'remove : in case of input is column (address looks like $A:$A and will return A:)
ColumnLetter = Replace(ColumnLetter, ":", "")
End Function

Thursday, March 23, 2006

crear campo autonumerico a una tabla

Como crear un campo autonumerico a una tabla que ya existe

Dim cadSQL As String
cadSQL = "ALTER TABLE Tabla " _
& "ADD COLUMN campo_autonumerico COUNTER"
CurrentDb.Execute cadSQL

Monday, March 06, 2006

Como instalar fuentes/letras

HOW TO INSTALL THE FONTS
http://www.freewebjunk.com/misc/fonts/

Windows Users:

1. Click Start > Settings > Control Panel.
2. Open the Fonts icon by double clicking the icon.
3. Within the Fonts window you will be able to view each of the currently installed fonts as well as install new fonts.
4. To install a font click File and select Install New Font.
5. Locate the directory of the fonts you wish to install.6. Highlight the fonts you wish to install and click OK.