Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: mar050703
  • Content: Threads
  • Order by date
  1. mar050703

    ExportAsFixedFormat

    Hi Guys Sorry to bother you all, I have a little problem with some code I am working on. I have an .xlsm file which I ExportAsFixedFormat to pdf, using the following code (this is only test version): Worksheets("Sheet2").Select ActiveSheet.ExportAsFixedFormat Type:=xltypepdf...
  2. mar050703

    Remove Watermark/Shape

    Hi All I am trying to code an excel sheet whereby the code will add a watermark/shape, save the document, and then I need it to remove the watermark/shape. So far I have the following code to add the watermark/shape With ActiveSheet.Shapes.AddTextEffect(msoTextEffect1, "Draft", _...
  3. mar050703

    SaveAs VBA Error

    Hello Please can someone help me? What I am trying to do is with the press of a button, copy sheet2 (which has formulas) as values only and then save that sheet as another file. But I need to keep the original sheet with the formulas. My code (all beit test code) is: Sub Button1_Click()...
  4. mar050703

    Combobox listing Sheet Names

    Please can someone help? I have the following code in a workbook of about 35 sheets: Sub Workbook_Open() Dim s As Worksheet Dim varSelect Dim i As Integer i = 0 Sheet1.Activate Set varSelect = Sheet26.ComboBox1 With varSelect For Each s In Worksheets...
  5. mar050703

    4 Week Months

    Hello I am trying to work out a formula in excel that can narrow down a 4 week and say 2 day working month into 4 weeks. So if 30th and 31st would be in week 1 of the following month (along with 1,2, and 3rd) therefore Monday 6th would be Week 2. I currently have the following formula...
  6. mar050703

    Copy Picure to new workbook

    Hi I have the following code: 'Sub to Save Deal Sheet to a New File Debug.Print Dim ws As Worksheet, wb As Workbook Dim Fnme As String Sheets("Deal Sheet").Select Set ws = ActiveSheet Set wb = Workbooks.Add(xlWBATWorksheet) ws.Range("A1:E41").Copy wb.Sheets(1).Range("A1").PasteSpecial...
  7. mar050703

    Message Box Formula

    Hello I need some help please. I am using the following code: LastDeal = Sheets("Data").Range("A1").End(xlDown).Row - 1 Cost = Sheets("Data").Range("E1").End(xlDown).Row - 1 SaleValue = Sheets("Data").Range("Q1").End(xlDown).Row - 1 Profit = Val(SaleValue) - Val(Cost) Sheets("Deal...
  8. mar050703

    Unable to get the Text Property of the Range Class

    Hi Helpers I have the following code Private Sub CMBStk_Change() Sheets("Sheet1").Select Range("A35").Select ActiveCell.Value = CMBStk TxtFrm.Text = Sheets("Sheet1").Range("B35").Text TxtCost.Text = Sheets("Sheet1").Range("C35").Text Sheets("Stock").Select...
  9. mar050703

    Unable to get the select property of the Range Class error

    Hi All I have the following code: Private Sub CmdOk_Click() Dim LastDeal As Integer LastDeal = Sheets("Data").Range("A1").End(xlDown).Select but I keep getting the error "Unable to get the select property of the Range Class." I am needing to reference the last used cell in RowA as...
  10. mar050703

    Code Problem

    I am trying to write some code whereby if a checkbox is true it will add the info to a stock sheet (which is fine), also if an item from the stock sheet is sold it marks it as yes and should later delete the item. (also fine), However the two do not seem to work together, if I need to add...
  11. mar050703

    Text Box Event

    I have the following Code: Private Sub TxtCC_AfterUpdate() If Not IsNumeric(TxtCC.Value) Then MsgBox "Only Numbers Please" Cancel = True End If With TxtCC If (Len(.Value) <> 4) Then MsgBox "Only 4 Numbers Allowed" Cancel = True End If End With End Sub However...
  12. mar050703

    Call Procedure

    I have a Module, which starts when clicking button 1, within this depending on the select option will open up a userform, with 3 separate buttons, the ok button, posts the data from the userform, and then I want to be able to give the option to call Module 1 again (to enter a 2nd lot of data)...
  13. mar050703

    Textbox Format as Currency

    Hi All, Just a quick question, I have a userform with varying textboxes, some of which I need to cause the entry to format as Currency on the spreadsheet. I am using the flowing code: ActiveCell.Offset(0, 22).Value = Format(TxtComAmt.Value, "£#,##0.00") Which is fine, except that it formats...
  14. mar050703

    Worksheet Function in VBA

    Hi I currently have the following formula in Column C =IF(A31=A30,CONCATENATE(TEXT(A31,"ddmmyy"),SUM(RIGHT(C30,3)+1)),CONCATENATE(TEXT(A31,"ddmmyy"),101)) Basically this looks at the value of Column A, and if the date is the same as the row above, It will add 1 to the last digit, (which is...
  15. mar050703

    VBA ValidateList

    Hello, I am trying to write some code that will allow me from a userform to place a validate list option in cell, but default to the first item in that list. I have the following code which seems to work to enable the cell to become a validatelist. Private Sub CommandButton1_Click() Dim...
  16. mar050703

    Wireless Network

    I am not sure if this is the correct forum, but I have a laptop running WIN XP, and a netgear router, the computer finds the network and connect no prblem. However when I try to connect another computer (say a friends laptop) with Vista, the laptop can see the network but will not connect, it...
  17. mar050703

    Combobox

    Hi I have 2 comboboxes in a userform, I have populated the first (called "Dept") listing the enteries using Additem ("name") etc. I require 2nd (called "Employee") to be populated dependant on the choice of the first. The choice would be from a list in Excel (Sheet = Employees) and the list...
  18. mar050703

    Multiple SUMIF

    Hi Guys I have the following in Row 2 Column B:M April - March Column A3:A68 are countries. What I want to do as add the value for each country dependant on a selected Month say in A1, and the selected Country is B1, in C1, I would have the value for the relevant Month and Country. Please can...
  19. mar050703

    fill 2nd Combobox

    I have the following code for my fost combobox; Private Sub Userform_Initialize() Dim ws As Worksheet Set ws = Worksheets("Employees") Set MyRange = ws.Range("A2", ws.Range("A150").End(xlUp)) With Me.Employee .RowSource = ws.Name & "!" & MyRange.Address .ListIndex = 0 End...
  20. mar050703

    VBA Date Ranges

    I am trying to write a macro that looks at a combobox (with names) and 2 text boxes (with dates) and on the back of that puts an "H" against the relevant name and dates. Therefore if Mr Smith has 1st Sept - 5th Off, then I see an "H" against his name and the relevant dates. However if the...

Part and Inventory Search

Back
Top