Wrox Programmer Forums
|
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 20th, 2007, 05:49 AM
Registered User
 
Join Date: Dec 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to samuel2680
Default error 438

I have a problem with this macro in excel, always have the same error
somebody can help me

macro:

Sub Vai_A()
    '
   ind_fo = Sheets("START").DropDowns(1).Val + 1 --> error!!
   nome_fo = Sheets("Lis_fogli").Cells(ind_fo, 1)
   Sheets(nome_fo).Activate
   If nome_fo = "Frontespizio" Then
    Columns("A:M").Select
    Range("M1").Activate
    ActiveWindow.Zoom = True
    Range("A2").Select
   ElseIf nome_fo = "Sinottico" Then
     Columns("A:AM").Select
    Range("AM1").Activate
    ActiveWindow.Zoom = True
    Range("A1").Select
   ElseIf nome_fo = "Guida" Then
     Columns("A:E").Select
    Range("E1").Activate
    ActiveWindow.Zoom = True
    Range("A1").Select
   Else
    Columns("A:Q").Select
    Range("Q1").Activate
    ActiveWindow.Zoom = True
    Range("A1").Select
   End If
End Sub

 
Old January 2nd, 2008, 12:49 PM
Registered User
 
Join Date: Jan 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:Originally posted by samuel2680
 I have a problem with this macro in excel, always have the same error
somebody can help me

macro:

Sub Vai_A()
    '
ind_fo = Sheets("START").DropDowns(1).Val + 1 --> error!!
nome_fo = Sheets("Lis_fogli").Cells(ind_fo, 1)
Sheets(nome_fo).Activate
If nome_fo = "Frontespizio" Then
    Columns("A:M").Select
    Range("M1").Activate
    ActiveWindow.Zoom = True
    Range("A2").Select
ElseIf nome_fo = "Sinottico" Then
     Columns("A:AM").Select
    Range("AM1").Activate
    ActiveWindow.Zoom = True
    Range("A1").Select
ElseIf nome_fo = "Guida" Then
     Columns("A:E").Select
    Range("E1").Activate
    ActiveWindow.Zoom = True
    Range("A1").Select
Else
    Columns("A:Q").Select
    Range("Q1").Activate
    ActiveWindow.Zoom = True
    Range("A1").Select
End If
End Sub

I couldn't find anything about "DropDowns" from a quick search. Have you tried Sheets("START").FormFields(1).DropDown.Value instead?





Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy visible cells in a macro?Runtime 438 error? nbaj2k Excel VBA 2 April 7th, 2010 11:13 AM
run-time error '438' in excel 2003 hugoscp Excel VBA 9 May 13th, 2009 05:08 AM
Insert Query Error & Run-Time Error 3022 DavidWE Access 1 July 31st, 2008 11:17 AM
Ch 4: Parse error: syntax error, unexpected T_SL hanizar77 BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 0 June 23rd, 2008 09:17 PM
Phile Page error, visual studio error reps BOOK: ASP.NET Website Programming Problem-Design-Solution 0 September 27th, 2003 10:11 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.