MS Access VBA Automation – Excel Font setzen und Autofit

Sub FormatExcel(pathFilename As String)

On Error GoTo FormatExcel_Error

Dim objExcel As Object
Set objExcel = CreateObject(“Excel.Application”)
objExcel.Visible = True
objExcel.DisplayAlerts = False

Dim objWorkbook As Workbook
Set objWorkbook = objExcel.Workbooks.Open(pathFilename)
Dim objWorksheet As Worksheet
Set objWorksheet = objWorkbook.Worksheets(1)

objWorksheet.Cells.Select
objWorksheet.Cells.Font.NAME = “Tahoma”
objWorksheet.Cells.Font.Size = 10
objWorksheet.Columns.AutoFit
objWorksheet.Cells(1, 1).Select

objWorkbook.Save
‘objExcel.Quit

Exit Sub

FormatExcel_Error:
MsgBox Err.Description
End Sub

Posted in Microsoft Access, Software Entwicklung | Leave a comment

Form aus externer Assembly aufrufen

Assembly – interne Form
/{PathToResource}
Beispiel:
NavigationService.Navigate(new Uri("/About.xaml", UriKind.Relative));

Assembly – interne Form in einem Unterverzeichnis
/{PathToResource}
Beispiel:
NavigationService.Navigate(new Uri("/Views/About.xaml", UriKind.Relative));

Assembly – externe Form in einem Unterverzeichnis
/{assemblyName};component/{PathToResource}
Beispiel
NavigationService.Navigate(new Uri("/DominikErnst.Library;component/Views/About.xaml", UriKind.Relative));

Assembly – interne Form – with HyperlinkButton
<HyperlinkButton NavigateUri="/About.xaml" Content="Navigate to a page in this assembly"/>

Assembly – externe Form – with HyperlinkButton
<HyperlinkButton NavigateUri="/DominikErnst.Library;component/About.xaml" Content="Navigate to external assembly"/>

Posted in Software Entwicklung, Windows Phone 7 | Leave a comment

Die Seiten zur Fotografie sind umgezogen nach dominik-ernst.de und der Fotoblog nach blog.dominik-ernst.de

Posted on by Dominik Ernst | Leave a comment