Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 85
Default Help changing a macro - SImple change please help

I can record macros like a pro, but editing the code is not for me. see
below code

Range("D1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Range("D1").Select
Application.CutCopyMode = False
With Selection.Validation
.Delete
.Add Type:=xlValidateInputOnly, AlertStyle:=xlValidAlertStop,
Operator _
:=xlBetween
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = ""
.ShowInput = True
.ShowError = True
End With
Range("D1").Select
ActiveCell.FormulaR1C1 = "Coordinator"
Columns("G:G").Select
Selection.Delete Shift:=xlToLeft
Range("H26").Select
ActiveWindow.SmallScroll Down:=-21


This is the part where I selected a cell, nameley D1 and removed the data
validation. How can I change this to affect all of D:D?

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,420
Default Help changing a macro - SImple change please help

But then you added it again, but loaded the cell with Coordinator, which
seems pointless to me.

What do you want do to D2 down?

--
__________________________________
HTH

Bob

"Jeremy" <jeremiah.a.reynolds @ gmail.com wrote in message
...
I can record macros like a pro, but editing the code is not for me. see
below code

Range("D1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Range("D1").Select
Application.CutCopyMode = False
With Selection.Validation
.Delete
.Add Type:=xlValidateInputOnly, AlertStyle:=xlValidAlertStop,
Operator _
:=xlBetween
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = ""
.ShowInput = True
.ShowError = True
End With
Range("D1").Select
ActiveCell.FormulaR1C1 = "Coordinator"
Columns("G:G").Select
Selection.Delete Shift:=xlToLeft
Range("H26").Select
ActiveWindow.SmallScroll Down:=-21


This is the part where I selected a cell, nameley D1 and removed the data
validation. How can I change this to affect all of D:D?

Thanks



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,420
Default Help changing a macro - SImple change please help

Oh, and what is being pasted into D1?

--
__________________________________
HTH

Bob

"Jeremy" <jeremiah.a.reynolds @ gmail.com wrote in message
...
I can record macros like a pro, but editing the code is not for me. see
below code

Range("D1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Range("D1").Select
Application.CutCopyMode = False
With Selection.Validation
.Delete
.Add Type:=xlValidateInputOnly, AlertStyle:=xlValidAlertStop,
Operator _
:=xlBetween
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = ""
.ShowInput = True
.ShowError = True
End With
Range("D1").Select
ActiveCell.FormulaR1C1 = "Coordinator"
Columns("G:G").Select
Selection.Delete Shift:=xlToLeft
Range("H26").Select
ActiveWindow.SmallScroll Down:=-21


This is the part where I selected a cell, nameley D1 and removed the data
validation. How can I change this to affect all of D:D?

Thanks



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,117
Default Help changing a macro - SImple change please help

try this - just before your data validation coding, change

Range("D1").Select

to this

Range("D:D").Select

that should work (even though you don't need to select, but that's how
you have it, so.......).
:)
susan


On Jul 15, 8:32*am, Jeremy <jeremiah.a.reynolds @ gmail.com wrote:
I can record macros like a pro, but editing the code is not for me. *see
below code

* * Range("D1").Select
* * Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
* * * * :=False, Transpose:=False
* * Range("D1").Select
* * Application.CutCopyMode = False
* * With Selection.Validation
* * * * .Delete
* * * * .Add Type:=xlValidateInputOnly, AlertStyle:=xlValidAlertStop,
Operator _
* * * * :=xlBetween
* * * * .IgnoreBlank = True
* * * * .InCellDropdown = True
* * * * .InputTitle = ""
* * * * .ErrorTitle = ""
* * * * .InputMessage = ""
* * * * .ErrorMessage = ""
* * * * .ShowInput = True
* * * * .ShowError = True
* * End With
* * Range("D1").Select
* * ActiveCell.FormulaR1C1 = "Coordinator"
* * Columns("G:G").Select
* * Selection.Delete Shift:=xlToLeft
* * Range("H26").Select
* * ActiveWindow.SmallScroll Down:=-21

This is the part where I selected a cell, nameley D1 and removed the data
validation. *How can I change this to affect all of D:D?

Thanks


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,942
Default Help changing a macro - SImple change please help

hi,
instead of..... Range("D1").Select
make it........ Range("D:D").Select
but you are pasting something in D1 before you are removing the validation
so either move the paste to after the removeal of validation or change the
select to
Range("D2:D65536")

regards
FSt1
"Jeremy" wrote:

I can record macros like a pro, but editing the code is not for me. see
below code

Range("D1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Range("D1").Select
Application.CutCopyMode = False
With Selection.Validation
.Delete
.Add Type:=xlValidateInputOnly, AlertStyle:=xlValidAlertStop,
Operator _
:=xlBetween
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = ""
.ShowInput = True
.ShowError = True
End With
Range("D1").Select
ActiveCell.FormulaR1C1 = "Coordinator"
Columns("G:G").Select
Selection.Delete Shift:=xlToLeft
Range("H26").Select
ActiveWindow.SmallScroll Down:=-21


This is the part where I selected a cell, nameley D1 and removed the data
validation. How can I change this to affect all of D:D?

Thanks

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing Simple lines and Graphics into Graphs with data Ish Excel Discussion (Misc queries) 2 December 20th 08 03:32 PM
Macro to Change Changing Date Format Data to Text Rod Bowyer Excel Discussion (Misc queries) 3 October 11th 07 12:02 PM
Should be simple: Lookup a picture from a folder based on a cell value changing Finny388 Excel Programming 8 April 19th 07 09:36 PM
simple query changing set of numbers from positive to negative sammy Excel Discussion (Misc queries) 2 May 1st 05 11:06 PM
How do I stop Excel from changing simple numbers to their 1/100th. Chris C Excel Discussion (Misc queries) 1 December 14th 04 07:14 PM


All times are GMT +1. The time now is 08:17 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"