Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Problem with report generation

Problem with report generation

Scheduled Pinned Locked Moved Visual Basic
designhelp
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    nazimghori
    wrote on last edited by
    #1

    Hello every one I want to generate my design my report in excel for that i wrote code like:-

    Me.xl = CreateObject("Excel.Application")
    Me.xl.Workbooks.Add()
    xl.Visible = True

    With Me.xl.Range("A" & ii, "E" & ii)

            .ColumnWidth = 20
            .Interior.ColorIndex = 14
    

    end with

    now i want to set the width of particular cell this works properly now i want right and left justification of cell like cell "D" so please suggest how should i approach.... thank you.. :) :)

    D 1 Reply Last reply
    0
    • N nazimghori

      Hello every one I want to generate my design my report in excel for that i wrote code like:-

      Me.xl = CreateObject("Excel.Application")
      Me.xl.Workbooks.Add()
      xl.Visible = True

      With Me.xl.Range("A" & ii, "E" & ii)

              .ColumnWidth = 20
              .Interior.ColorIndex = 14
      

      end with

      now i want to set the width of particular cell this works properly now i want right and left justification of cell like cell "D" so please suggest how should i approach.... thank you.. :) :)

      D Offline
      D Offline
      Dalek Dave
      wrote on last edited by
      #2

      nazimghori wrote:

      now i want to set the width of particular cell this works properly

      Columns("A:E").ColumnWidth = 20

      nazimghori wrote:

      now i want right and left justification of cell like cell "D"

      If you want it like a particular cell try this... Range("F4").Select Selection.Copy Range("H4").Select Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _ SkipBlanks:=False, Transpose:=False

      ------------------------------------ "Possessions make you poor, wealth is measurable only in experience." Sun Tzu 621BC

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups