Consulting

Results 1 to 2 of 2

Thread: Sleeper: Dynamically write data in cell

  1. #1

    Question Sleeper: Dynamically write data in cell

    below is the code for which i am using it by moving the cursor and writing the data on selected cell. I need to write dynamically without moving


    For Each na In cSheets
    Sheets("RESULT").Select
    ActiveCell.value = na.Name
    ActiveCell.Offset(0, 1).Select
    ActiveCell.value = ce.Address(False, False)
    ActiveCell.Offset(0, 1).Select
    ActiveCell.value = ce.Text
    ActiveCell.Offset(0, 1).Select
    ActiveCell.value = "" + Sheets(na & 2).Range(ce.Address).Text
    ActiveCell.Offset(1, -3).Select
    Next na

  2. #2
    VBAX Master Norie's Avatar
    Joined
    Jan 2005
    Location
    Stirling, Scotland
    Posts
    1,831
    Location
    What exactly do you mean?

    Can we see the rest of the code?
    For Each na In cSheets
    	
    	Set rng = Sheets("RESULT").ActiveCell
    	rng.Value = na.Name
    	rng.Offset(0, 1).Value = ce.Address(False, False)
    	rng.Offset(0, 2).Value = ce.Text
    	rng.Offset(0, 3).Value = Sheets(na & 2).Range(ce.Address).Text
    	Set rng = rng.Offset(1, 0)
    	
    Next na

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •