Encore moi.
J'ai deux loop de lectures un dans l'autre en relation. Quand je fais la
première lecture du premier recordset, tout est correct. La relation avec le
deuxième recordset fonctionne régulièrement et je peux dessiner mon premier
schéma.
Quand je passe à la deuxième lecture du premier recordset j'arrive à
renommer la feuille (ExlWB.Sheets(wFactCount).Name = rsFact!strTableName), à
ajouter le rectangle (AddShape(msoShapeRectangle,.), lui donner un nom, mais
quand j'arrive à « With .ShapeRange » j'ai l'erreur suivant :
Propriété ou méthode non gérée par cet objet
Voila le code et merci:
Set db = CurrentDb
gSQL = "SELECT intTableId, strTableName, strDisplayName" _
& " FROM tblTable" _
& " WHERE intTableTypeId = 3"
Set rsFact = CurrentDb.OpenRecordset(gSQL, dbOpenSnapshot)
With rsFact
.MoveFirst
wFactCount = 0
Do Until .EOF
wFactCount = wFactCount + 1
Set ExlWS = ExlWB.Sheets(wFactCount)
ExlWB.Sheets(wFactCount).Name = rsFact!strTableName
..
ExlWS.Shapes.AddShape(msoShapeRectangle, xc, yc, BoxW,
BoxH).Select
With Selection
.Name = rsFact!strTableName
.Characters.Text = rsFact!strTableName
With .ShapeRange
With .Fill
.Visible = True
.Solid
.ForeColor.SchemeColor = 26
.Transparency = 0#
End With
With .Line
.Weight = 0.75
.DashStyle = msoLineSolid
.Style = msoLineSingle
.Transparency = 0#
.Visible = msoTrue
.ForeColor.SchemeColor = 64
.BackColor.RGB = RGB(255, 255, 255)
End With
.Shadow.Type = msoShadow14
.TextFrame.MarginLeft = 0#
.TextFrame.MarginRight = 0#
End With
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
With .Font
.FontStyle = "ARIAL"
.Size = 12
.ColorIndex = xlAutomatic
End With
End With
'-----------------------------------------------------------------------
Next fact
.MoveNext
Loop
.Close
End With
Encore moi.
J'ai deux loop de lectures un dans l'autre en relation. Quand je fais la
première lecture du premier recordset, tout est correct. La relation avec le
deuxième recordset fonctionne régulièrement et je peux dessiner mon premier
schéma.
Quand je passe à la deuxième lecture du premier recordset j'arrive à
renommer la feuille (ExlWB.Sheets(wFactCount).Name = rsFact!strTableName), à
ajouter le rectangle (AddShape(msoShapeRectangle,.), lui donner un nom, mais
quand j'arrive à « With .ShapeRange » j'ai l'erreur suivant :
Propriété ou méthode non gérée par cet objet
Voila le code et merci:
Set db = CurrentDb
gSQL = "SELECT intTableId, strTableName, strDisplayName" _
& " FROM tblTable" _
& " WHERE intTableTypeId = 3"
Set rsFact = CurrentDb.OpenRecordset(gSQL, dbOpenSnapshot)
With rsFact
.MoveFirst
wFactCount = 0
Do Until .EOF
wFactCount = wFactCount + 1
Set ExlWS = ExlWB.Sheets(wFactCount)
ExlWB.Sheets(wFactCount).Name = rsFact!strTableName
..
ExlWS.Shapes.AddShape(msoShapeRectangle, xc, yc, BoxW,
BoxH).Select
With Selection
.Name = rsFact!strTableName
.Characters.Text = rsFact!strTableName
With .ShapeRange
With .Fill
.Visible = True
.Solid
.ForeColor.SchemeColor = 26
.Transparency = 0#
End With
With .Line
.Weight = 0.75
.DashStyle = msoLineSolid
.Style = msoLineSingle
.Transparency = 0#
.Visible = msoTrue
.ForeColor.SchemeColor = 64
.BackColor.RGB = RGB(255, 255, 255)
End With
.Shadow.Type = msoShadow14
.TextFrame.MarginLeft = 0#
.TextFrame.MarginRight = 0#
End With
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
With .Font
.FontStyle = "ARIAL"
.Size = 12
.ColorIndex = xlAutomatic
End With
End With
'-----------------------------------------------------------------------
Next fact
.MoveNext
Loop
.Close
End With
Encore moi.
J'ai deux loop de lectures un dans l'autre en relation. Quand je fais la
première lecture du premier recordset, tout est correct. La relation avec le
deuxième recordset fonctionne régulièrement et je peux dessiner mon premier
schéma.
Quand je passe à la deuxième lecture du premier recordset j'arrive à
renommer la feuille (ExlWB.Sheets(wFactCount).Name = rsFact!strTableName), à
ajouter le rectangle (AddShape(msoShapeRectangle,.), lui donner un nom, mais
quand j'arrive à « With .ShapeRange » j'ai l'erreur suivant :
Propriété ou méthode non gérée par cet objet
Voila le code et merci:
Set db = CurrentDb
gSQL = "SELECT intTableId, strTableName, strDisplayName" _
& " FROM tblTable" _
& " WHERE intTableTypeId = 3"
Set rsFact = CurrentDb.OpenRecordset(gSQL, dbOpenSnapshot)
With rsFact
.MoveFirst
wFactCount = 0
Do Until .EOF
wFactCount = wFactCount + 1
Set ExlWS = ExlWB.Sheets(wFactCount)
ExlWB.Sheets(wFactCount).Name = rsFact!strTableName
..
ExlWS.Shapes.AddShape(msoShapeRectangle, xc, yc, BoxW,
BoxH).Select
With Selection
.Name = rsFact!strTableName
.Characters.Text = rsFact!strTableName
With .ShapeRange
With .Fill
.Visible = True
.Solid
.ForeColor.SchemeColor = 26
.Transparency = 0#
End With
With .Line
.Weight = 0.75
.DashStyle = msoLineSolid
.Style = msoLineSingle
.Transparency = 0#
.Visible = msoTrue
.ForeColor.SchemeColor = 64
.BackColor.RGB = RGB(255, 255, 255)
End With
.Shadow.Type = msoShadow14
.TextFrame.MarginLeft = 0#
.TextFrame.MarginRight = 0#
End With
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
With .Font
.FontStyle = "ARIAL"
.Size = 12
.ColorIndex = xlAutomatic
End With
End With
'-----------------------------------------------------------------------
Next fact
.MoveNext
Loop
.Close
End With
Bonjour,
Le problème est à ce niveau :
With Selection
car lorsque tu es sous Excel la propriété s'applique de manière implicite
à l'objet Application (Excel), mais ici tu es sous Access il faut donc
lui
fournir explicitement l'objet auquel il se réfère à savoir un objet
Application (Excel), cela devrait donner un truc de ce genre :
With ExlApp.Selection
Wendake a écrit :Encore moi.
J'ai deux loop de lectures un dans l'autre en relation. Quand je fais la
première lecture du premier recordset, tout est correct. La relation avec
le deuxième recordset fonctionne régulièrement et je peux dessiner mon
premier schéma.
Quand je passe à la deuxième lecture du premier recordset j'arrive à
renommer la feuille (ExlWB.Sheets(wFactCount).Name =
rsFact!strTableName), à ajouter le rectangle
(AddShape(msoShapeRectangle,.), lui donner un nom, mais quand j'arrive à
« With .ShapeRange » j'ai l'erreur suivant :
Propriété ou méthode non gérée par cet objet
Voila le code et merci:
Set db = CurrentDb
gSQL = "SELECT intTableId, strTableName, strDisplayName" _
& " FROM tblTable" _
& " WHERE intTableTypeId = 3"
Set rsFact = CurrentDb.OpenRecordset(gSQL, dbOpenSnapshot)
With rsFact
.MoveFirst
wFactCount = 0
Do Until .EOF
wFactCount = wFactCount + 1
Set ExlWS = ExlWB.Sheets(wFactCount)
ExlWB.Sheets(wFactCount).Name = rsFact!strTableName
..
ExlWS.Shapes.AddShape(msoShapeRectangle, xc, yc, BoxW,
BoxH).Select
With Selection
.Name = rsFact!strTableName
.Characters.Text = rsFact!strTableName
With .ShapeRange
With .Fill
.Visible = True
.Solid
.ForeColor.SchemeColor = 26
.Transparency = 0#
End With
With .Line
.Weight = 0.75
.DashStyle = msoLineSolid
.Style = msoLineSingle
.Transparency = 0#
.Visible = msoTrue
.ForeColor.SchemeColor = 64
.BackColor.RGB = RGB(255, 255, 255)
End With
.Shadow.Type = msoShadow14
.TextFrame.MarginLeft = 0#
.TextFrame.MarginRight = 0#
End With
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
With .Font
.FontStyle = "ARIAL"
.Size = 12
.ColorIndex = xlAutomatic
End With
End With
'-----------------------------------------------------------------------
Next fact
.MoveNext
Loop
.Close
End With
Bonjour,
Le problème est à ce niveau :
With Selection
car lorsque tu es sous Excel la propriété s'applique de manière implicite
à l'objet Application (Excel), mais ici tu es sous Access il faut donc
lui
fournir explicitement l'objet auquel il se réfère à savoir un objet
Application (Excel), cela devrait donner un truc de ce genre :
With ExlApp.Selection
Wendake a écrit :
Encore moi.
J'ai deux loop de lectures un dans l'autre en relation. Quand je fais la
première lecture du premier recordset, tout est correct. La relation avec
le deuxième recordset fonctionne régulièrement et je peux dessiner mon
premier schéma.
Quand je passe à la deuxième lecture du premier recordset j'arrive à
renommer la feuille (ExlWB.Sheets(wFactCount).Name =
rsFact!strTableName), à ajouter le rectangle
(AddShape(msoShapeRectangle,.), lui donner un nom, mais quand j'arrive à
« With .ShapeRange » j'ai l'erreur suivant :
Propriété ou méthode non gérée par cet objet
Voila le code et merci:
Set db = CurrentDb
gSQL = "SELECT intTableId, strTableName, strDisplayName" _
& " FROM tblTable" _
& " WHERE intTableTypeId = 3"
Set rsFact = CurrentDb.OpenRecordset(gSQL, dbOpenSnapshot)
With rsFact
.MoveFirst
wFactCount = 0
Do Until .EOF
wFactCount = wFactCount + 1
Set ExlWS = ExlWB.Sheets(wFactCount)
ExlWB.Sheets(wFactCount).Name = rsFact!strTableName
..
ExlWS.Shapes.AddShape(msoShapeRectangle, xc, yc, BoxW,
BoxH).Select
With Selection
.Name = rsFact!strTableName
.Characters.Text = rsFact!strTableName
With .ShapeRange
With .Fill
.Visible = True
.Solid
.ForeColor.SchemeColor = 26
.Transparency = 0#
End With
With .Line
.Weight = 0.75
.DashStyle = msoLineSolid
.Style = msoLineSingle
.Transparency = 0#
.Visible = msoTrue
.ForeColor.SchemeColor = 64
.BackColor.RGB = RGB(255, 255, 255)
End With
.Shadow.Type = msoShadow14
.TextFrame.MarginLeft = 0#
.TextFrame.MarginRight = 0#
End With
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
With .Font
.FontStyle = "ARIAL"
.Size = 12
.ColorIndex = xlAutomatic
End With
End With
'-----------------------------------------------------------------------
Next fact
.MoveNext
Loop
.Close
End With
Bonjour,
Le problème est à ce niveau :
With Selection
car lorsque tu es sous Excel la propriété s'applique de manière implicite
à l'objet Application (Excel), mais ici tu es sous Access il faut donc
lui
fournir explicitement l'objet auquel il se réfère à savoir un objet
Application (Excel), cela devrait donner un truc de ce genre :
With ExlApp.Selection
Wendake a écrit :Encore moi.
J'ai deux loop de lectures un dans l'autre en relation. Quand je fais la
première lecture du premier recordset, tout est correct. La relation avec
le deuxième recordset fonctionne régulièrement et je peux dessiner mon
premier schéma.
Quand je passe à la deuxième lecture du premier recordset j'arrive à
renommer la feuille (ExlWB.Sheets(wFactCount).Name =
rsFact!strTableName), à ajouter le rectangle
(AddShape(msoShapeRectangle,.), lui donner un nom, mais quand j'arrive à
« With .ShapeRange » j'ai l'erreur suivant :
Propriété ou méthode non gérée par cet objet
Voila le code et merci:
Set db = CurrentDb
gSQL = "SELECT intTableId, strTableName, strDisplayName" _
& " FROM tblTable" _
& " WHERE intTableTypeId = 3"
Set rsFact = CurrentDb.OpenRecordset(gSQL, dbOpenSnapshot)
With rsFact
.MoveFirst
wFactCount = 0
Do Until .EOF
wFactCount = wFactCount + 1
Set ExlWS = ExlWB.Sheets(wFactCount)
ExlWB.Sheets(wFactCount).Name = rsFact!strTableName
..
ExlWS.Shapes.AddShape(msoShapeRectangle, xc, yc, BoxW,
BoxH).Select
With Selection
.Name = rsFact!strTableName
.Characters.Text = rsFact!strTableName
With .ShapeRange
With .Fill
.Visible = True
.Solid
.ForeColor.SchemeColor = 26
.Transparency = 0#
End With
With .Line
.Weight = 0.75
.DashStyle = msoLineSolid
.Style = msoLineSingle
.Transparency = 0#
.Visible = msoTrue
.ForeColor.SchemeColor = 64
.BackColor.RGB = RGB(255, 255, 255)
End With
.Shadow.Type = msoShadow14
.TextFrame.MarginLeft = 0#
.TextFrame.MarginRight = 0#
End With
.HorizontalAlignment = xlCenter
.VerticalAlignment = xlCenter
With .Font
.FontStyle = "ARIAL"
.Size = 12
.ColorIndex = xlAutomatic
End With
End With
'-----------------------------------------------------------------------
Next fact
.MoveNext
Loop
.Close
End With
Mais alors ne devrait pas fonctionner aussi avec la première lecture du
recordset, tandis que ça fonctionne parfaitement. En plus « AddShape est
pour une worksheet et non pour un Application
ExlWS.Shapes.AddShape(msoShapeRectangle, xc, yc, BoxW, BoxH).Select
Salut.
"Michel__D" a écrit dans le message de
news:
> Bonjour,
>
> Le problème est à ce niveau :
>
> With Selection
>
> car lorsque tu es sous Excel la propriété s'applique de manière implicite
> à l'objet Application (Excel), mais ici tu es sous Access il faut donc
> lui
> fournir explicitement l'objet auquel il se réfère à savoir un objet
> Application (Excel), cela devrait donner un truc de ce genre :
>
> With ExlApp.Selection
>
>
> Wendake a écrit :
>> Encore moi.
>>
>> J'ai deux loop de lectures un dans l'autre en relation. Quand je fais la
>> première lecture du premier recordset, tout est correct. La relation avec
>> le deuxième recordset fonctionne régulièrement et je peux dessiner mon
>> premier schéma.
>>
>> Quand je passe à la deuxième lecture du premier recordset j'arrive à
>> renommer la feuille (ExlWB.Sheets(wFactCount).Name > >> rsFact!strTableName), à ajouter le rectangle
>> (AddShape(msoShapeRectangle,.), lui donner un nom, mais quand j'arrive à
>> « With .ShapeRange » j'ai l'erreur suivant :
>>
>> Propriété ou méthode non gérée par cet objet
>>
>> Voila le code et merci:
>>
>>
>>
>>
>>
>> Set db = CurrentDb
>>
>> gSQL = "SELECT intTableId, strTableName, strDisplayName" _
>>
>> & " FROM tblTable" _
>>
>> & " WHERE intTableTypeId = 3"
>>
>> Set rsFact = CurrentDb.OpenRecordset(gSQL, dbOpenSnapshot)
>>
>> With rsFact
>>
>> .MoveFirst
>>
>> wFactCount = 0
>>
>> Do Until .EOF
>>
>> wFactCount = wFactCount + 1
>>
>> Set ExlWS = ExlWB.Sheets(wFactCount)
>>
>> ExlWB.Sheets(wFactCount).Name = rsFact!strTableName
>>
>> ..
>>
>> ExlWS.Shapes.AddShape(msoShapeRectangle, xc, yc, BoxW,
>> BoxH).Select
>>
>> With Selection
>>
>> .Name = rsFact!strTableName
>>
>> .Characters.Text = rsFact!strTableName
>>
>> With .ShapeRange
>>
>> With .Fill
>>
>> .Visible = True
>>
>> .Solid
>>
>> .ForeColor.SchemeColor = 26
>>
>> .Transparency = 0#
>>
>> End With
>>
>> With .Line
>>
>> .Weight = 0.75
>>
>> .DashStyle = msoLineSolid
>>
>> .Style = msoLineSingle
>>
>> .Transparency = 0#
>>
>> .Visible = msoTrue
>>
>> .ForeColor.SchemeColor = 64
>>
>> .BackColor.RGB = RGB(255, 255, 255)
>>
>> End With
>>
>> .Shadow.Type = msoShadow14
>>
>> .TextFrame.MarginLeft = 0#
>>
>> .TextFrame.MarginRight = 0#
>>
>> End With
>>
>> .HorizontalAlignment = xlCenter
>>
>> .VerticalAlignment = xlCenter
>>
>> With .Font
>>
>> .FontStyle = "ARIAL"
>>
>> .Size = 12
>>
>> .ColorIndex = xlAutomatic
>>
>> End With
>>
>> End With
>>
>>
>> '-----------------------------------------------------------------------
>> Next fact
>>
>> .MoveNext
>>
>> Loop
>>
>> .Close
>>
>> End With
>>
Mais alors ne devrait pas fonctionner aussi avec la première lecture du
recordset, tandis que ça fonctionne parfaitement. En plus « AddShape est
pour une worksheet et non pour un Application
ExlWS.Shapes.AddShape(msoShapeRectangle, xc, yc, BoxW, BoxH).Select
Salut.
"Michel__D" <Michel.NOSPAM@orange-ft.com.invalid> a écrit dans le message de
news: e29pPXpbJHA.2444@TK2MSFTNGP06.phx.gbl...
> Bonjour,
>
> Le problème est à ce niveau :
>
> With Selection
>
> car lorsque tu es sous Excel la propriété s'applique de manière implicite
> à l'objet Application (Excel), mais ici tu es sous Access il faut donc
> lui
> fournir explicitement l'objet auquel il se réfère à savoir un objet
> Application (Excel), cela devrait donner un truc de ce genre :
>
> With ExlApp.Selection
>
>
> Wendake a écrit :
>> Encore moi.
>>
>> J'ai deux loop de lectures un dans l'autre en relation. Quand je fais la
>> première lecture du premier recordset, tout est correct. La relation avec
>> le deuxième recordset fonctionne régulièrement et je peux dessiner mon
>> premier schéma.
>>
>> Quand je passe à la deuxième lecture du premier recordset j'arrive à
>> renommer la feuille (ExlWB.Sheets(wFactCount).Name > >> rsFact!strTableName), à ajouter le rectangle
>> (AddShape(msoShapeRectangle,.), lui donner un nom, mais quand j'arrive à
>> « With .ShapeRange » j'ai l'erreur suivant :
>>
>> Propriété ou méthode non gérée par cet objet
>>
>> Voila le code et merci:
>>
>>
>>
>>
>>
>> Set db = CurrentDb
>>
>> gSQL = "SELECT intTableId, strTableName, strDisplayName" _
>>
>> & " FROM tblTable" _
>>
>> & " WHERE intTableTypeId = 3"
>>
>> Set rsFact = CurrentDb.OpenRecordset(gSQL, dbOpenSnapshot)
>>
>> With rsFact
>>
>> .MoveFirst
>>
>> wFactCount = 0
>>
>> Do Until .EOF
>>
>> wFactCount = wFactCount + 1
>>
>> Set ExlWS = ExlWB.Sheets(wFactCount)
>>
>> ExlWB.Sheets(wFactCount).Name = rsFact!strTableName
>>
>> ..
>>
>> ExlWS.Shapes.AddShape(msoShapeRectangle, xc, yc, BoxW,
>> BoxH).Select
>>
>> With Selection
>>
>> .Name = rsFact!strTableName
>>
>> .Characters.Text = rsFact!strTableName
>>
>> With .ShapeRange
>>
>> With .Fill
>>
>> .Visible = True
>>
>> .Solid
>>
>> .ForeColor.SchemeColor = 26
>>
>> .Transparency = 0#
>>
>> End With
>>
>> With .Line
>>
>> .Weight = 0.75
>>
>> .DashStyle = msoLineSolid
>>
>> .Style = msoLineSingle
>>
>> .Transparency = 0#
>>
>> .Visible = msoTrue
>>
>> .ForeColor.SchemeColor = 64
>>
>> .BackColor.RGB = RGB(255, 255, 255)
>>
>> End With
>>
>> .Shadow.Type = msoShadow14
>>
>> .TextFrame.MarginLeft = 0#
>>
>> .TextFrame.MarginRight = 0#
>>
>> End With
>>
>> .HorizontalAlignment = xlCenter
>>
>> .VerticalAlignment = xlCenter
>>
>> With .Font
>>
>> .FontStyle = "ARIAL"
>>
>> .Size = 12
>>
>> .ColorIndex = xlAutomatic
>>
>> End With
>>
>> End With
>>
>>
>> '-----------------------------------------------------------------------
>> Next fact
>>
>> .MoveNext
>>
>> Loop
>>
>> .Close
>>
>> End With
>>
Mais alors ne devrait pas fonctionner aussi avec la première lecture du
recordset, tandis que ça fonctionne parfaitement. En plus « AddShape est
pour une worksheet et non pour un Application
ExlWS.Shapes.AddShape(msoShapeRectangle, xc, yc, BoxW, BoxH).Select
Salut.
"Michel__D" a écrit dans le message de
news:
> Bonjour,
>
> Le problème est à ce niveau :
>
> With Selection
>
> car lorsque tu es sous Excel la propriété s'applique de manière implicite
> à l'objet Application (Excel), mais ici tu es sous Access il faut donc
> lui
> fournir explicitement l'objet auquel il se réfère à savoir un objet
> Application (Excel), cela devrait donner un truc de ce genre :
>
> With ExlApp.Selection
>
>
> Wendake a écrit :
>> Encore moi.
>>
>> J'ai deux loop de lectures un dans l'autre en relation. Quand je fais la
>> première lecture du premier recordset, tout est correct. La relation avec
>> le deuxième recordset fonctionne régulièrement et je peux dessiner mon
>> premier schéma.
>>
>> Quand je passe à la deuxième lecture du premier recordset j'arrive à
>> renommer la feuille (ExlWB.Sheets(wFactCount).Name > >> rsFact!strTableName), à ajouter le rectangle
>> (AddShape(msoShapeRectangle,.), lui donner un nom, mais quand j'arrive à
>> « With .ShapeRange » j'ai l'erreur suivant :
>>
>> Propriété ou méthode non gérée par cet objet
>>
>> Voila le code et merci:
>>
>>
>>
>>
>>
>> Set db = CurrentDb
>>
>> gSQL = "SELECT intTableId, strTableName, strDisplayName" _
>>
>> & " FROM tblTable" _
>>
>> & " WHERE intTableTypeId = 3"
>>
>> Set rsFact = CurrentDb.OpenRecordset(gSQL, dbOpenSnapshot)
>>
>> With rsFact
>>
>> .MoveFirst
>>
>> wFactCount = 0
>>
>> Do Until .EOF
>>
>> wFactCount = wFactCount + 1
>>
>> Set ExlWS = ExlWB.Sheets(wFactCount)
>>
>> ExlWB.Sheets(wFactCount).Name = rsFact!strTableName
>>
>> ..
>>
>> ExlWS.Shapes.AddShape(msoShapeRectangle, xc, yc, BoxW,
>> BoxH).Select
>>
>> With Selection
>>
>> .Name = rsFact!strTableName
>>
>> .Characters.Text = rsFact!strTableName
>>
>> With .ShapeRange
>>
>> With .Fill
>>
>> .Visible = True
>>
>> .Solid
>>
>> .ForeColor.SchemeColor = 26
>>
>> .Transparency = 0#
>>
>> End With
>>
>> With .Line
>>
>> .Weight = 0.75
>>
>> .DashStyle = msoLineSolid
>>
>> .Style = msoLineSingle
>>
>> .Transparency = 0#
>>
>> .Visible = msoTrue
>>
>> .ForeColor.SchemeColor = 64
>>
>> .BackColor.RGB = RGB(255, 255, 255)
>>
>> End With
>>
>> .Shadow.Type = msoShadow14
>>
>> .TextFrame.MarginLeft = 0#
>>
>> .TextFrame.MarginRight = 0#
>>
>> End With
>>
>> .HorizontalAlignment = xlCenter
>>
>> .VerticalAlignment = xlCenter
>>
>> With .Font
>>
>> .FontStyle = "ARIAL"
>>
>> .Size = 12
>>
>> .ColorIndex = xlAutomatic
>>
>> End With
>>
>> End With
>>
>>
>> '-----------------------------------------------------------------------
>> Next fact
>>
>> .MoveNext
>>
>> Loop
>>
>> .Close
>>
>> End With
>>
Bonjour,
Exécute en pas en pas, tu verras bien, mais je dois pas être loin de la
vérité.
PS:La propriété "Selection" se réfère à l'objet Application (Excel) et ce
n'est
pas moi qui l'affirme mais l'aide, d'ailleurs tu ferais bien d'y jeter un
oeil.
"Wendake" a écrit dans le message de
news:Mais alors ne devrait pas fonctionner aussi avec la première lecture du
recordset, tandis que ça fonctionne parfaitement. En plus « AddShape est
pour une worksheet et non pour un Application
ExlWS.Shapes.AddShape(msoShapeRectangle, xc, yc, BoxW, BoxH).Select
Salut.
"Michel__D" a écrit dans le message
de
news:
> Bonjour,
>
> Le problème est à ce niveau :
>
> With Selection
>
> car lorsque tu es sous Excel la propriété s'applique de manière
> implicite
> à l'objet Application (Excel), mais ici tu es sous Access il faut donc
> lui
> fournir explicitement l'objet auquel il se réfère à savoir un objet
> Application (Excel), cela devrait donner un truc de ce genre :
>
> With ExlApp.Selection
>
>
> Wendake a écrit :
>> Encore moi.
>>
>> J'ai deux loop de lectures un dans l'autre en relation. Quand je fais
>> la
>> première lecture du premier recordset, tout est correct. La relation
>> avec
>> le deuxième recordset fonctionne régulièrement et je peux dessiner mon
>> premier schéma.
>>
>> Quand je passe à la deuxième lecture du premier recordset j'arrive à
>> renommer la feuille (ExlWB.Sheets(wFactCount).Name >> >> rsFact!strTableName), à ajouter le rectangle
>> (AddShape(msoShapeRectangle,.), lui donner un nom, mais quand j'arrive
>> à
>> « With .ShapeRange » j'ai l'erreur suivant :
>>
>> Propriété ou méthode non gérée par cet objet
>>
>> Voila le code et merci:
>>
>>
>>
>>
>>
>> Set db = CurrentDb
>>
>> gSQL = "SELECT intTableId, strTableName, strDisplayName" _
>>
>> & " FROM tblTable" _
>>
>> & " WHERE intTableTypeId = 3"
>>
>> Set rsFact = CurrentDb.OpenRecordset(gSQL, dbOpenSnapshot)
>>
>> With rsFact
>>
>> .MoveFirst
>>
>> wFactCount = 0
>>
>> Do Until .EOF
>>
>> wFactCount = wFactCount + 1
>>
>> Set ExlWS = ExlWB.Sheets(wFactCount)
>>
>> ExlWB.Sheets(wFactCount).Name = rsFact!strTableName
>>
>> ..
>>
>> ExlWS.Shapes.AddShape(msoShapeRectangle, xc, yc, BoxW,
>> BoxH).Select
>>
>> With Selection
>>
>> .Name = rsFact!strTableName
>>
>> .Characters.Text = rsFact!strTableName
>>
>> With .ShapeRange
>>
>> With .Fill
>>
>> .Visible = True
>>
>> .Solid
>>
>> .ForeColor.SchemeColor = 26
>>
>> .Transparency = 0#
>>
>> End With
>>
>> With .Line
>>
>> .Weight = 0.75
>>
>> .DashStyle = msoLineSolid
>>
>> .Style = msoLineSingle
>>
>> .Transparency = 0#
>>
>> .Visible = msoTrue
>>
>> .ForeColor.SchemeColor = 64
>>
>> .BackColor.RGB = RGB(255, 255, 255)
>>
>> End With
>>
>> .Shadow.Type = msoShadow14
>>
>> .TextFrame.MarginLeft = 0#
>>
>> .TextFrame.MarginRight = 0#
>>
>> End With
>>
>> .HorizontalAlignment = xlCenter
>>
>> .VerticalAlignment = xlCenter
>>
>> With .Font
>>
>> .FontStyle = "ARIAL"
>>
>> .Size = 12
>>
>> .ColorIndex = xlAutomatic
>>
>> End With
>>
>> End With
>>
>>
>> '-----------------------------------------------------------------------
>> Next fact
>>
>> .MoveNext
>>
>> Loop
>>
>> .Close
>>
>> End With
>>
Bonjour,
Exécute en pas en pas, tu verras bien, mais je dois pas être loin de la
vérité.
PS:La propriété "Selection" se réfère à l'objet Application (Excel) et ce
n'est
pas moi qui l'affirme mais l'aide, d'ailleurs tu ferais bien d'y jeter un
oeil.
"Wendake" <wendake@uroni.it> a écrit dans le message de
news:ujg4HEsbJHA.4900@TK2MSFTNGP06.phx.gbl...
Mais alors ne devrait pas fonctionner aussi avec la première lecture du
recordset, tandis que ça fonctionne parfaitement. En plus « AddShape est
pour une worksheet et non pour un Application
ExlWS.Shapes.AddShape(msoShapeRectangle, xc, yc, BoxW, BoxH).Select
Salut.
"Michel__D" <Michel.NOSPAM@orange-ft.com.invalid> a écrit dans le message
de
news: e29pPXpbJHA.2444@TK2MSFTNGP06.phx.gbl...
> Bonjour,
>
> Le problème est à ce niveau :
>
> With Selection
>
> car lorsque tu es sous Excel la propriété s'applique de manière
> implicite
> à l'objet Application (Excel), mais ici tu es sous Access il faut donc
> lui
> fournir explicitement l'objet auquel il se réfère à savoir un objet
> Application (Excel), cela devrait donner un truc de ce genre :
>
> With ExlApp.Selection
>
>
> Wendake a écrit :
>> Encore moi.
>>
>> J'ai deux loop de lectures un dans l'autre en relation. Quand je fais
>> la
>> première lecture du premier recordset, tout est correct. La relation
>> avec
>> le deuxième recordset fonctionne régulièrement et je peux dessiner mon
>> premier schéma.
>>
>> Quand je passe à la deuxième lecture du premier recordset j'arrive à
>> renommer la feuille (ExlWB.Sheets(wFactCount).Name >> >> rsFact!strTableName), à ajouter le rectangle
>> (AddShape(msoShapeRectangle,.), lui donner un nom, mais quand j'arrive
>> à
>> « With .ShapeRange » j'ai l'erreur suivant :
>>
>> Propriété ou méthode non gérée par cet objet
>>
>> Voila le code et merci:
>>
>>
>>
>>
>>
>> Set db = CurrentDb
>>
>> gSQL = "SELECT intTableId, strTableName, strDisplayName" _
>>
>> & " FROM tblTable" _
>>
>> & " WHERE intTableTypeId = 3"
>>
>> Set rsFact = CurrentDb.OpenRecordset(gSQL, dbOpenSnapshot)
>>
>> With rsFact
>>
>> .MoveFirst
>>
>> wFactCount = 0
>>
>> Do Until .EOF
>>
>> wFactCount = wFactCount + 1
>>
>> Set ExlWS = ExlWB.Sheets(wFactCount)
>>
>> ExlWB.Sheets(wFactCount).Name = rsFact!strTableName
>>
>> ..
>>
>> ExlWS.Shapes.AddShape(msoShapeRectangle, xc, yc, BoxW,
>> BoxH).Select
>>
>> With Selection
>>
>> .Name = rsFact!strTableName
>>
>> .Characters.Text = rsFact!strTableName
>>
>> With .ShapeRange
>>
>> With .Fill
>>
>> .Visible = True
>>
>> .Solid
>>
>> .ForeColor.SchemeColor = 26
>>
>> .Transparency = 0#
>>
>> End With
>>
>> With .Line
>>
>> .Weight = 0.75
>>
>> .DashStyle = msoLineSolid
>>
>> .Style = msoLineSingle
>>
>> .Transparency = 0#
>>
>> .Visible = msoTrue
>>
>> .ForeColor.SchemeColor = 64
>>
>> .BackColor.RGB = RGB(255, 255, 255)
>>
>> End With
>>
>> .Shadow.Type = msoShadow14
>>
>> .TextFrame.MarginLeft = 0#
>>
>> .TextFrame.MarginRight = 0#
>>
>> End With
>>
>> .HorizontalAlignment = xlCenter
>>
>> .VerticalAlignment = xlCenter
>>
>> With .Font
>>
>> .FontStyle = "ARIAL"
>>
>> .Size = 12
>>
>> .ColorIndex = xlAutomatic
>>
>> End With
>>
>> End With
>>
>>
>> '-----------------------------------------------------------------------
>> Next fact
>>
>> .MoveNext
>>
>> Loop
>>
>> .Close
>>
>> End With
>>
Bonjour,
Exécute en pas en pas, tu verras bien, mais je dois pas être loin de la
vérité.
PS:La propriété "Selection" se réfère à l'objet Application (Excel) et ce
n'est
pas moi qui l'affirme mais l'aide, d'ailleurs tu ferais bien d'y jeter un
oeil.
"Wendake" a écrit dans le message de
news:Mais alors ne devrait pas fonctionner aussi avec la première lecture du
recordset, tandis que ça fonctionne parfaitement. En plus « AddShape est
pour une worksheet et non pour un Application
ExlWS.Shapes.AddShape(msoShapeRectangle, xc, yc, BoxW, BoxH).Select
Salut.
"Michel__D" a écrit dans le message
de
news:
> Bonjour,
>
> Le problème est à ce niveau :
>
> With Selection
>
> car lorsque tu es sous Excel la propriété s'applique de manière
> implicite
> à l'objet Application (Excel), mais ici tu es sous Access il faut donc
> lui
> fournir explicitement l'objet auquel il se réfère à savoir un objet
> Application (Excel), cela devrait donner un truc de ce genre :
>
> With ExlApp.Selection
>
>
> Wendake a écrit :
>> Encore moi.
>>
>> J'ai deux loop de lectures un dans l'autre en relation. Quand je fais
>> la
>> première lecture du premier recordset, tout est correct. La relation
>> avec
>> le deuxième recordset fonctionne régulièrement et je peux dessiner mon
>> premier schéma.
>>
>> Quand je passe à la deuxième lecture du premier recordset j'arrive à
>> renommer la feuille (ExlWB.Sheets(wFactCount).Name >> >> rsFact!strTableName), à ajouter le rectangle
>> (AddShape(msoShapeRectangle,.), lui donner un nom, mais quand j'arrive
>> à
>> « With .ShapeRange » j'ai l'erreur suivant :
>>
>> Propriété ou méthode non gérée par cet objet
>>
>> Voila le code et merci:
>>
>>
>>
>>
>>
>> Set db = CurrentDb
>>
>> gSQL = "SELECT intTableId, strTableName, strDisplayName" _
>>
>> & " FROM tblTable" _
>>
>> & " WHERE intTableTypeId = 3"
>>
>> Set rsFact = CurrentDb.OpenRecordset(gSQL, dbOpenSnapshot)
>>
>> With rsFact
>>
>> .MoveFirst
>>
>> wFactCount = 0
>>
>> Do Until .EOF
>>
>> wFactCount = wFactCount + 1
>>
>> Set ExlWS = ExlWB.Sheets(wFactCount)
>>
>> ExlWB.Sheets(wFactCount).Name = rsFact!strTableName
>>
>> ..
>>
>> ExlWS.Shapes.AddShape(msoShapeRectangle, xc, yc, BoxW,
>> BoxH).Select
>>
>> With Selection
>>
>> .Name = rsFact!strTableName
>>
>> .Characters.Text = rsFact!strTableName
>>
>> With .ShapeRange
>>
>> With .Fill
>>
>> .Visible = True
>>
>> .Solid
>>
>> .ForeColor.SchemeColor = 26
>>
>> .Transparency = 0#
>>
>> End With
>>
>> With .Line
>>
>> .Weight = 0.75
>>
>> .DashStyle = msoLineSolid
>>
>> .Style = msoLineSingle
>>
>> .Transparency = 0#
>>
>> .Visible = msoTrue
>>
>> .ForeColor.SchemeColor = 64
>>
>> .BackColor.RGB = RGB(255, 255, 255)
>>
>> End With
>>
>> .Shadow.Type = msoShadow14
>>
>> .TextFrame.MarginLeft = 0#
>>
>> .TextFrame.MarginRight = 0#
>>
>> End With
>>
>> .HorizontalAlignment = xlCenter
>>
>> .VerticalAlignment = xlCenter
>>
>> With .Font
>>
>> .FontStyle = "ARIAL"
>>
>> .Size = 12
>>
>> .ColorIndex = xlAutomatic
>>
>> End With
>>
>> End With
>>
>>
>> '-----------------------------------------------------------------------
>> Next fact
>>
>> .MoveNext
>>
>> Loop
>>
>> .Close
>>
>> End With
>>
OK, tu as raison et en effet j'ai passé l'obstacle « Selection », maintenant
je n'arrive pas à quitter le processus. À la fin j'ai utilisé les mêmes
instruction d'un autre programme qui fonctionne.
With ExlApp
.DisplayAlerts = False
.ActiveWorkbook.Save
.DisplayAlerts = True
.Workbooks.Close
.Quit
End With
Set ExlWS = Nothing
Set ExlWB = Nothing
Set ExlApp = Nothing
Salut
"Michel__D" a écrit dans le message de
news: gjsrmc$gkv$
> Bonjour,
>
> Exécute en pas en pas, tu verras bien, mais je dois pas être loin de la
> vérité.
>
> PS:La propriété "Selection" se réfère à l'objet Application (Excel) et ce
> n'est
> pas moi qui l'affirme mais l'aide, d'ailleurs tu ferais bien d'y jeter un
> oeil.
>
>
> "Wendake" a écrit dans le message de
> news:
>> Mais alors ne devrait pas fonctionner aussi avec la première lecture du
>> recordset, tandis que ça fonctionne parfaitement. En plus « AddShape est
>> pour une worksheet et non pour un Application
>>
>>
>>
>> ExlWS.Shapes.AddShape(msoShapeRectangle, xc, yc, BoxW, BoxH).Select
>>
>>
>>
>> Salut.
>>
>> "Michel__D" a écrit dans le message
>> de
>> news:
>> > Bonjour,
>> >
>> > Le problème est à ce niveau :
>> >
>> > With Selection
>> >
>> > car lorsque tu es sous Excel la propriété s'applique de manière
>> > implicite
>> > à l'objet Application (Excel), mais ici tu es sous Access il faut donc
>> > lui
>> > fournir explicitement l'objet auquel il se réfère à savoir un objet
>> > Application (Excel), cela devrait donner un truc de ce genre :
>> >
>> > With ExlApp.Selection
>> >
>> >
>> > Wendake a écrit :
>> >> Encore moi.
>> >>
>> >> J'ai deux loop de lectures un dans l'autre en relation. Quand je fais
>> >> la
>> >> première lecture du premier recordset, tout est correct. La relation
>> >> avec
>> >> le deuxième recordset fonctionne régulièrement et je peux dessiner mon
>> >> premier schéma.
>> >>
>> >> Quand je passe à la deuxième lecture du premier recordset j'arrive à
>> >> renommer la feuille (ExlWB.Sheets(wFactCount).Name > >> >> rsFact!strTableName), à ajouter le rectangle
>> >> (AddShape(msoShapeRectangle,.), lui donner un nom, mais quand j'arrive
>> >> à
>> >> « With .ShapeRange » j'ai l'erreur suivant :
>> >>
>> >> Propriété ou méthode non gérée par cet objet
>> >>
>> >> Voila le code et merci:
>> >>
>> >>
>> >>
>> >>
>> >>
>> >> Set db = CurrentDb
>> >>
>> >> gSQL = "SELECT intTableId, strTableName, strDisplayName" _
>> >>
>> >> & " FROM tblTable" _
>> >>
>> >> & " WHERE intTableTypeId = 3"
>> >>
>> >> Set rsFact = CurrentDb.OpenRecordset(gSQL, dbOpenSnapshot)
>> >>
>> >> With rsFact
>> >>
>> >> .MoveFirst
>> >>
>> >> wFactCount = 0
>> >>
>> >> Do Until .EOF
>> >>
>> >> wFactCount = wFactCount + 1
>> >>
>> >> Set ExlWS = ExlWB.Sheets(wFactCount)
>> >>
>> >> ExlWB.Sheets(wFactCount).Name = rsFact!strTableName
>> >>
>> >> ..
>> >>
>> >> ExlWS.Shapes.AddShape(msoShapeRectangle, xc, yc, BoxW,
>> >> BoxH).Select
>> >>
>> >> With Selection
>> >>
>> >> .Name = rsFact!strTableName
>> >>
>> >> .Characters.Text = rsFact!strTableName
>> >>
>> >> With .ShapeRange
>> >>
>> >> With .Fill
>> >>
>> >> .Visible = True
>> >>
>> >> .Solid
>> >>
>> >> .ForeColor.SchemeColor = 26
>> >>
>> >> .Transparency = 0#
>> >>
>> >> End With
>> >>
>> >> With .Line
>> >>
>> >> .Weight = 0.75
>> >>
>> >> .DashStyle = msoLineSolid
>> >>
>> >> .Style = msoLineSingle
>> >>
>> >> .Transparency = 0#
>> >>
>> >> .Visible = msoTrue
>> >>
>> >> .ForeColor.SchemeColor = 64
>> >>
>> >> .BackColor.RGB = RGB(255, 255, 255)
>> >>
>> >> End With
>> >>
>> >> .Shadow.Type = msoShadow14
>> >>
>> >> .TextFrame.MarginLeft = 0#
>> >>
>> >> .TextFrame.MarginRight = 0#
>> >>
>> >> End With
>> >>
>> >> .HorizontalAlignment = xlCenter
>> >>
>> >> .VerticalAlignment = xlCenter
>> >>
>> >> With .Font
>> >>
>> >> .FontStyle = "ARIAL"
>> >>
>> >> .Size = 12
>> >>
>> >> .ColorIndex = xlAutomatic
>> >>
>> >> End With
>> >>
>> >> End With
>> >>
>> >>
>> >> '-----------------------------------------------------------------------
>> >> Next fact
>> >>
>> >> .MoveNext
>> >>
>> >> Loop
>> >>
>> >> .Close
>> >>
>> >> End With
>> >>
>>
>
OK, tu as raison et en effet j'ai passé l'obstacle « Selection », maintenant
je n'arrive pas à quitter le processus. À la fin j'ai utilisé les mêmes
instruction d'un autre programme qui fonctionne.
With ExlApp
.DisplayAlerts = False
.ActiveWorkbook.Save
.DisplayAlerts = True
.Workbooks.Close
.Quit
End With
Set ExlWS = Nothing
Set ExlWB = Nothing
Set ExlApp = Nothing
Salut
"Michel__D" <michel.NOSPAM@orange-ft.com.invalid> a écrit dans le message de
news: gjsrmc$gkv$1@news.rd.francetelecom.fr...
> Bonjour,
>
> Exécute en pas en pas, tu verras bien, mais je dois pas être loin de la
> vérité.
>
> PS:La propriété "Selection" se réfère à l'objet Application (Excel) et ce
> n'est
> pas moi qui l'affirme mais l'aide, d'ailleurs tu ferais bien d'y jeter un
> oeil.
>
>
> "Wendake" <wendake@uroni.it> a écrit dans le message de
> news:ujg4HEsbJHA.4900@TK2MSFTNGP06.phx.gbl...
>> Mais alors ne devrait pas fonctionner aussi avec la première lecture du
>> recordset, tandis que ça fonctionne parfaitement. En plus « AddShape est
>> pour une worksheet et non pour un Application
>>
>>
>>
>> ExlWS.Shapes.AddShape(msoShapeRectangle, xc, yc, BoxW, BoxH).Select
>>
>>
>>
>> Salut.
>>
>> "Michel__D" <Michel.NOSPAM@orange-ft.com.invalid> a écrit dans le message
>> de
>> news: e29pPXpbJHA.2444@TK2MSFTNGP06.phx.gbl...
>> > Bonjour,
>> >
>> > Le problème est à ce niveau :
>> >
>> > With Selection
>> >
>> > car lorsque tu es sous Excel la propriété s'applique de manière
>> > implicite
>> > à l'objet Application (Excel), mais ici tu es sous Access il faut donc
>> > lui
>> > fournir explicitement l'objet auquel il se réfère à savoir un objet
>> > Application (Excel), cela devrait donner un truc de ce genre :
>> >
>> > With ExlApp.Selection
>> >
>> >
>> > Wendake a écrit :
>> >> Encore moi.
>> >>
>> >> J'ai deux loop de lectures un dans l'autre en relation. Quand je fais
>> >> la
>> >> première lecture du premier recordset, tout est correct. La relation
>> >> avec
>> >> le deuxième recordset fonctionne régulièrement et je peux dessiner mon
>> >> premier schéma.
>> >>
>> >> Quand je passe à la deuxième lecture du premier recordset j'arrive à
>> >> renommer la feuille (ExlWB.Sheets(wFactCount).Name > >> >> rsFact!strTableName), à ajouter le rectangle
>> >> (AddShape(msoShapeRectangle,.), lui donner un nom, mais quand j'arrive
>> >> à
>> >> « With .ShapeRange » j'ai l'erreur suivant :
>> >>
>> >> Propriété ou méthode non gérée par cet objet
>> >>
>> >> Voila le code et merci:
>> >>
>> >>
>> >>
>> >>
>> >>
>> >> Set db = CurrentDb
>> >>
>> >> gSQL = "SELECT intTableId, strTableName, strDisplayName" _
>> >>
>> >> & " FROM tblTable" _
>> >>
>> >> & " WHERE intTableTypeId = 3"
>> >>
>> >> Set rsFact = CurrentDb.OpenRecordset(gSQL, dbOpenSnapshot)
>> >>
>> >> With rsFact
>> >>
>> >> .MoveFirst
>> >>
>> >> wFactCount = 0
>> >>
>> >> Do Until .EOF
>> >>
>> >> wFactCount = wFactCount + 1
>> >>
>> >> Set ExlWS = ExlWB.Sheets(wFactCount)
>> >>
>> >> ExlWB.Sheets(wFactCount).Name = rsFact!strTableName
>> >>
>> >> ..
>> >>
>> >> ExlWS.Shapes.AddShape(msoShapeRectangle, xc, yc, BoxW,
>> >> BoxH).Select
>> >>
>> >> With Selection
>> >>
>> >> .Name = rsFact!strTableName
>> >>
>> >> .Characters.Text = rsFact!strTableName
>> >>
>> >> With .ShapeRange
>> >>
>> >> With .Fill
>> >>
>> >> .Visible = True
>> >>
>> >> .Solid
>> >>
>> >> .ForeColor.SchemeColor = 26
>> >>
>> >> .Transparency = 0#
>> >>
>> >> End With
>> >>
>> >> With .Line
>> >>
>> >> .Weight = 0.75
>> >>
>> >> .DashStyle = msoLineSolid
>> >>
>> >> .Style = msoLineSingle
>> >>
>> >> .Transparency = 0#
>> >>
>> >> .Visible = msoTrue
>> >>
>> >> .ForeColor.SchemeColor = 64
>> >>
>> >> .BackColor.RGB = RGB(255, 255, 255)
>> >>
>> >> End With
>> >>
>> >> .Shadow.Type = msoShadow14
>> >>
>> >> .TextFrame.MarginLeft = 0#
>> >>
>> >> .TextFrame.MarginRight = 0#
>> >>
>> >> End With
>> >>
>> >> .HorizontalAlignment = xlCenter
>> >>
>> >> .VerticalAlignment = xlCenter
>> >>
>> >> With .Font
>> >>
>> >> .FontStyle = "ARIAL"
>> >>
>> >> .Size = 12
>> >>
>> >> .ColorIndex = xlAutomatic
>> >>
>> >> End With
>> >>
>> >> End With
>> >>
>> >>
>> >> '-----------------------------------------------------------------------
>> >> Next fact
>> >>
>> >> .MoveNext
>> >>
>> >> Loop
>> >>
>> >> .Close
>> >>
>> >> End With
>> >>
>>
>
OK, tu as raison et en effet j'ai passé l'obstacle « Selection », maintenant
je n'arrive pas à quitter le processus. À la fin j'ai utilisé les mêmes
instruction d'un autre programme qui fonctionne.
With ExlApp
.DisplayAlerts = False
.ActiveWorkbook.Save
.DisplayAlerts = True
.Workbooks.Close
.Quit
End With
Set ExlWS = Nothing
Set ExlWB = Nothing
Set ExlApp = Nothing
Salut
"Michel__D" a écrit dans le message de
news: gjsrmc$gkv$
> Bonjour,
>
> Exécute en pas en pas, tu verras bien, mais je dois pas être loin de la
> vérité.
>
> PS:La propriété "Selection" se réfère à l'objet Application (Excel) et ce
> n'est
> pas moi qui l'affirme mais l'aide, d'ailleurs tu ferais bien d'y jeter un
> oeil.
>
>
> "Wendake" a écrit dans le message de
> news:
>> Mais alors ne devrait pas fonctionner aussi avec la première lecture du
>> recordset, tandis que ça fonctionne parfaitement. En plus « AddShape est
>> pour une worksheet et non pour un Application
>>
>>
>>
>> ExlWS.Shapes.AddShape(msoShapeRectangle, xc, yc, BoxW, BoxH).Select
>>
>>
>>
>> Salut.
>>
>> "Michel__D" a écrit dans le message
>> de
>> news:
>> > Bonjour,
>> >
>> > Le problème est à ce niveau :
>> >
>> > With Selection
>> >
>> > car lorsque tu es sous Excel la propriété s'applique de manière
>> > implicite
>> > à l'objet Application (Excel), mais ici tu es sous Access il faut donc
>> > lui
>> > fournir explicitement l'objet auquel il se réfère à savoir un objet
>> > Application (Excel), cela devrait donner un truc de ce genre :
>> >
>> > With ExlApp.Selection
>> >
>> >
>> > Wendake a écrit :
>> >> Encore moi.
>> >>
>> >> J'ai deux loop de lectures un dans l'autre en relation. Quand je fais
>> >> la
>> >> première lecture du premier recordset, tout est correct. La relation
>> >> avec
>> >> le deuxième recordset fonctionne régulièrement et je peux dessiner mon
>> >> premier schéma.
>> >>
>> >> Quand je passe à la deuxième lecture du premier recordset j'arrive à
>> >> renommer la feuille (ExlWB.Sheets(wFactCount).Name > >> >> rsFact!strTableName), à ajouter le rectangle
>> >> (AddShape(msoShapeRectangle,.), lui donner un nom, mais quand j'arrive
>> >> à
>> >> « With .ShapeRange » j'ai l'erreur suivant :
>> >>
>> >> Propriété ou méthode non gérée par cet objet
>> >>
>> >> Voila le code et merci:
>> >>
>> >>
>> >>
>> >>
>> >>
>> >> Set db = CurrentDb
>> >>
>> >> gSQL = "SELECT intTableId, strTableName, strDisplayName" _
>> >>
>> >> & " FROM tblTable" _
>> >>
>> >> & " WHERE intTableTypeId = 3"
>> >>
>> >> Set rsFact = CurrentDb.OpenRecordset(gSQL, dbOpenSnapshot)
>> >>
>> >> With rsFact
>> >>
>> >> .MoveFirst
>> >>
>> >> wFactCount = 0
>> >>
>> >> Do Until .EOF
>> >>
>> >> wFactCount = wFactCount + 1
>> >>
>> >> Set ExlWS = ExlWB.Sheets(wFactCount)
>> >>
>> >> ExlWB.Sheets(wFactCount).Name = rsFact!strTableName
>> >>
>> >> ..
>> >>
>> >> ExlWS.Shapes.AddShape(msoShapeRectangle, xc, yc, BoxW,
>> >> BoxH).Select
>> >>
>> >> With Selection
>> >>
>> >> .Name = rsFact!strTableName
>> >>
>> >> .Characters.Text = rsFact!strTableName
>> >>
>> >> With .ShapeRange
>> >>
>> >> With .Fill
>> >>
>> >> .Visible = True
>> >>
>> >> .Solid
>> >>
>> >> .ForeColor.SchemeColor = 26
>> >>
>> >> .Transparency = 0#
>> >>
>> >> End With
>> >>
>> >> With .Line
>> >>
>> >> .Weight = 0.75
>> >>
>> >> .DashStyle = msoLineSolid
>> >>
>> >> .Style = msoLineSingle
>> >>
>> >> .Transparency = 0#
>> >>
>> >> .Visible = msoTrue
>> >>
>> >> .ForeColor.SchemeColor = 64
>> >>
>> >> .BackColor.RGB = RGB(255, 255, 255)
>> >>
>> >> End With
>> >>
>> >> .Shadow.Type = msoShadow14
>> >>
>> >> .TextFrame.MarginLeft = 0#
>> >>
>> >> .TextFrame.MarginRight = 0#
>> >>
>> >> End With
>> >>
>> >> .HorizontalAlignment = xlCenter
>> >>
>> >> .VerticalAlignment = xlCenter
>> >>
>> >> With .Font
>> >>
>> >> .FontStyle = "ARIAL"
>> >>
>> >> .Size = 12
>> >>
>> >> .ColorIndex = xlAutomatic
>> >>
>> >> End With
>> >>
>> >> End With
>> >>
>> >>
>> >> '-----------------------------------------------------------------------
>> >> Next fact
>> >>
>> >> .MoveNext
>> >>
>> >> Loop
>> >>
>> >> .Close
>> >>
>> >> End With
>> >>
>>
>